diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/blobstore/BlobStoreIndexShardGateway.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/blobstore/BlobStoreIndexShardGateway.java index 33db76dc25c..68b2226c626 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/blobstore/BlobStoreIndexShardGateway.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/blobstore/BlobStoreIndexShardGateway.java @@ -333,7 +333,7 @@ public abstract class BlobStoreIndexShardGateway extends AbstractIndexShardCompo // now go over all the blobs, and if they don't exists in a commit point, delete them for (String blobName : blobs.keySet()) { String name = blobName; - if (name.startsWith("commit-")) { + if (!name.startsWith("__")) { continue; } if (blobName.contains(".part")) { @@ -811,7 +811,7 @@ public abstract class BlobStoreIndexShardGateway extends AbstractIndexShardCompo private long findLatestFileNameGeneration(ImmutableMap blobs) { long generation = -1; for (String name : blobs.keySet()) { - if (name.startsWith("commit-")) { + if (!name.startsWith("__")) { continue; } if (name.contains(".part")) {