don't wait for indices if there are none when using local gateway

This commit is contained in:
kimchy 2010-09-15 18:22:13 +02:00
parent e52daa9670
commit 09cdc1c379
1 changed files with 6 additions and 0 deletions

View File

@ -143,6 +143,12 @@ public class LocalGateway extends AbstractLifecycleComponent<Gateway> implements
listener.onSuccess();
return;
}
if (electedState.state().metaData().indices().isEmpty()) {
logger.debug("no indices in metadata");
listener.onSuccess();
return;
}
logger.debug("elected state from [{}]", electedState.node());
final LocalGatewayMetaState state = electedState.state();
final AtomicInteger indicesCounter = new AtomicInteger(state.metaData().indices().size());