don't wait for indices if there are none when using local gateway
This commit is contained in:
parent
e52daa9670
commit
09cdc1c379
|
@ -143,6 +143,12 @@ public class LocalGateway extends AbstractLifecycleComponent<Gateway> implements
|
||||||
listener.onSuccess();
|
listener.onSuccess();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (electedState.state().metaData().indices().isEmpty()) {
|
||||||
|
logger.debug("no indices in metadata");
|
||||||
|
listener.onSuccess();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
logger.debug("elected state from [{}]", electedState.node());
|
logger.debug("elected state from [{}]", electedState.node());
|
||||||
final LocalGatewayMetaState state = electedState.state();
|
final LocalGatewayMetaState state = electedState.state();
|
||||||
final AtomicInteger indicesCounter = new AtomicInteger(state.metaData().indices().size());
|
final AtomicInteger indicesCounter = new AtomicInteger(state.metaData().indices().size());
|
||||||
|
|
Loading…
Reference in New Issue