From e6ee2769260740c200d0e80b4ed5b177fa255a00 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sat, 30 Jul 2011 23:13:36 +0300 Subject: [PATCH] add more info to logging failure --- .../elasticsearch/gateway/blobstore/BlobStoreGateway.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/blobstore/BlobStoreGateway.java b/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/blobstore/BlobStoreGateway.java index aa107453c06..654a71f163c 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/blobstore/BlobStoreGateway.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/gateway/blobstore/BlobStoreGateway.java @@ -196,11 +196,13 @@ public abstract class BlobStoreGateway extends SharedStorageGateway { int fileIndex = Integer.parseInt(name.substring(name.indexOf('-') + 1)); if (fileIndex >= index) { // try and read the meta data + byte[] data = null; try { - readMetaData(metaDataBlobContainer.readBlobFully(name)); + data = metaDataBlobContainer.readBlobFully(name); + readMetaData(data); index = fileIndex; } catch (IOException e) { - logger.warn("[findLatestMetadata]: Failed to read metadata from [" + name + "], ignoring...", e); + logger.warn("[findLatestMetadata]: failed to read metadata from [{}], data_length [{}] ignoring...", e, name, data == null ? "na" : data.length); } } }