diff --git a/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java b/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java index 63c95a04691..89e48c500b6 100644 --- a/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java +++ b/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java @@ -694,7 +694,7 @@ public class BlobStoreIndexShardRepository extends AbstractComponent implements reusedTotalSize += md.length(); recoveryState.getIndex().addReusedFileDetail(fileInfo.name(), fileInfo.length()); if (logger.isTraceEnabled()) { - logger.trace("not_recovering [{}], exists in local store and is same", fileInfo.physicalName()); + logger.trace("[{}] [{}] not_recovering [{}] from [{}], exists in local store and is same", shardId, snapshotId, fileInfo.physicalName(), fileInfo.name()); } } else { totalSize += fileInfo.length(); @@ -702,9 +702,9 @@ public class BlobStoreIndexShardRepository extends AbstractComponent implements recoveryState.getIndex().addFileDetail(fileInfo.name(), fileInfo.length()); if (logger.isTraceEnabled()) { if (md == null) { - logger.trace("recovering [{}], does not exists in local store", fileInfo.physicalName()); + logger.trace("[{}] [{}] recovering [{}] from [{}], does not exists in local store", shardId, snapshotId, fileInfo.physicalName(), fileInfo.name()); } else { - logger.trace("recovering [{}], exists in local store but is different", fileInfo.physicalName()); + logger.trace("[{}] [{}] recovering [{}] from [{}], exists in local store but is different", shardId, snapshotId, fileInfo.physicalName(), fileInfo.name()); } } } diff --git a/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java b/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java index 4b7748f85e8..f4d2f6c804d 100644 --- a/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java +++ b/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java @@ -65,6 +65,7 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.snapshots.SnapshotState; import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest; +import org.elasticsearch.test.junit.annotations.TestLogging; import org.junit.Test; import java.io.IOException; @@ -451,6 +452,7 @@ public class BasicBackwardsCompatibilityTest extends ElasticsearchBackwardsCompa } @Test + @TestLogging("index.snapshots:TRACE,index.shard.service:TRACE") public void testSnapshotAndRestore() throws ExecutionException, InterruptedException, IOException { logger.info("--> creating repository"); assertAcked(client().admin().cluster().preparePutRepository("test-repo")