diff --git a/src/main/java/org/elasticsearch/alerts/AlertManager.java b/src/main/java/org/elasticsearch/alerts/AlertManager.java index 6cb354e4482..39b837a4c5a 100644 --- a/src/main/java/org/elasticsearch/alerts/AlertManager.java +++ b/src/main/java/org/elasticsearch/alerts/AlertManager.java @@ -224,15 +224,15 @@ public class AlertManager extends AbstractComponent { private void internalStart(ClusterState initialState) { if (state.compareAndSet(State.STOPPED, State.STARTING)) { ClusterState clusterState = initialState; + // Try to load alert store before the action manager, b/c action depends on alert store while (true) { - if (actionManager.start(clusterState)) { + if (alertsStore.start(clusterState)) { break; } clusterState = newClusterState(clusterState); } - while (true) { - if (alertsStore.start(clusterState)) { + if (actionManager.start(clusterState)) { break; } clusterState = newClusterState(clusterState);