Skip to content

Commit

Permalink
Remove deletion logic causing read issues due to deleted segments_N
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <surajrider@gmail.com>
  • Loading branch information
dreamer-89 committed Aug 1, 2023
1 parent 21c71d8 commit 4e79a05
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4659,15 +4659,6 @@ public void syncSegmentsFromRemoteSegmentStore(boolean overrideLocal, boolean re
);
long processedLocalCheckpoint = Long.parseLong(infosSnapshot.getUserData().get(LOCAL_CHECKPOINT_KEY));
store.commitSegmentInfos(infosSnapshot, processedLocalCheckpoint, processedLocalCheckpoint);
Collection<String> currentInfoFiles = infosSnapshot.files(true);
// For recovering shards, clean up un-usable incremental refresh files and commit points.
if (state() != IndexShardState.STARTED) {
for (String localFile : storeDirectory.listAll()) {
if (Store.isAutogenerated(localFile) == false && currentInfoFiles.contains(localFile) == false) {
storeDirectory.deleteFile(localFile);
}
}
}
}
}
} catch (IOException e) {
Expand Down

0 comments on commit 4e79a05

Please sign in to comment.