@@ -540,7 +540,7 @@ impl LocalGcWorker {
540540 fn filter_deletable_files (
541541 & self ,
542542 entries : Vec < Entry > ,
543- in_use_filenames : & HashSet < & FileId > ,
543+ in_use_filenames : & HashSet < FileId > ,
544544 may_linger_filenames : & HashSet < & FileId > ,
545545 eligible_for_removal : & HashSet < & FileId > ,
546546 unknown_file_may_linger_until : chrono:: DateTime < chrono:: Utc > ,
@@ -641,9 +641,6 @@ impl LocalGcWorker {
641641 . flatten ( )
642642 . collect :: < HashSet < _ > > ( ) ;
643643
644- // in use filenames, include sst and index files
645- let in_use_filenames = in_used. iter ( ) . collect :: < HashSet < _ > > ( ) ;
646-
647644 // When full_file_listing is false, skip expensive list operations and only delete
648645 // files that are tracked in recently_removed_files
649646 if !self . full_file_listing {
@@ -653,7 +650,7 @@ impl LocalGcWorker {
653650 // 3. Have passed the lingering time
654651 let files_to_delete: Vec < FileId > = eligible_for_removal
655652 . iter ( )
656- . filter ( |file_id| !in_use_filenames . contains ( * file_id) )
653+ . filter ( |file_id| !in_used . contains ( * file_id) )
657654 . map ( |& f| * f)
658655 . collect ( ) ;
659656
@@ -672,7 +669,7 @@ impl LocalGcWorker {
672669 let ( all_unused_files_ready_for_delete, all_in_exist_linger_files) = self
673670 . filter_deletable_files (
674671 all_entries,
675- & in_use_filenames ,
672+ & in_used ,
676673 & may_linger_filenames,
677674 & eligible_for_removal,
678675 unknown_file_may_linger_until,
0 commit comments