flush_index hangs when no indices exist, closes #19.

This commit is contained in:
kimchy 2010-02-16 21:56:24 +02:00
parent 5d781961a0
commit 1299f20364
1 changed files with 4 additions and 0 deletions

View File

@ -123,6 +123,10 @@ public abstract class TransportBroadcastOperationAction<Request extends Broadcas
}
public void start() {
if (shardsIts.size() == 0) {
// no shards
listener.onResponse(newResponse(request, new AtomicReferenceArray(0), clusterState));
}
// count the local operations, and perform the non local ones
int localOperations = 0;
for (final ShardsIterator shardIt : shardsIts) {