From b8ab50828cbe3b41c5d0c430150caefe029ba019 Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 24 Aug 2010 14:48:49 +0300 Subject: [PATCH] only list and delete files we created --- .../index/gateway/blobstore/BlobStoreIndexShardGateway.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")) {