Removed useless if check

Original commit: elastic/x-pack-elasticsearch@c9fea5aca4
This commit is contained in:
Martijn van Groningen 2014-11-20 12:42:41 +01:00
parent 15d9101ea9
commit 306fefd847
1 changed files with 3 additions and 4 deletions

View File

@ -200,10 +200,9 @@ public class AlertManager extends AbstractComponent {
});
} else {
if (event.state().blocks().hasGlobalBlock(GatewayService.STATE_NOT_RECOVERED_BLOCK)) {
return; // wait until the gateway has recovered from disk
}
if (isStarted()) {
return; // We're already started
// wait until the gateway has recovered from disk, otherwise we think may not have .alerts and
// a .alertshistory index, but they may not have been restored from the cluster state on disk
return;
}
if (state.compareAndSet(State.STOPPED, State.LOADING)) {
initialize(event.state());