From 939d583550258d4522ba8b8cdba04545ff505709 Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 23 Aug 2010 15:42:03 +0300 Subject: [PATCH] initial chunk of work on refactoring the gateway, syntatic gateway files names, commit points that include translog information --- .../index/gateway/blobstore/BlobStoreIndexShardGateway.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 93a988f9f1d..75bed84569d 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 @@ -398,7 +398,7 @@ public abstract class BlobStoreIndexShardGateway extends AbstractIndexShardCompo FastByteArrayOutputStream bos = new FastByteArrayOutputStream(); boolean ignore = false; - @Override public void onPartial(byte[] data, int offset, int size) throws IOException { + @Override public synchronized void onPartial(byte[] data, int offset, int size) throws IOException { if (ignore) { return; } @@ -449,6 +449,9 @@ public abstract class BlobStoreIndexShardGateway extends AbstractIndexShardCompo } @Override public synchronized void onCompleted() { + if (ignore) { + return; + } if (!transIt.hasNext()) { latch.countDown(); return;