diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index 051543a1a30c2..8b600cf14c40d 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -4660,7 +4660,7 @@ public void syncSegmentsFromRemoteSegmentStore(boolean overrideLocal, boolean re long processedLocalCheckpoint = Long.parseLong(infosSnapshot.getUserData().get(LOCAL_CHECKPOINT_KEY)); store.commitSegmentInfos(infosSnapshot, processedLocalCheckpoint, processedLocalCheckpoint); Collection currentInfoFiles = infosSnapshot.files(true); - // For recovering shards, clean up un-usable incremental refresh files. + // 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) {