Core: load alert store before the action manager, b/c action depends on alert store
Original commit: elastic/x-pack-elasticsearch@6aa3cb33b0
This commit is contained in:
parent
56a121109d
commit
e4d10c58a9
|
@ -224,15 +224,15 @@ public class AlertManager extends AbstractComponent {
|
||||||
private void internalStart(ClusterState initialState) {
|
private void internalStart(ClusterState initialState) {
|
||||||
if (state.compareAndSet(State.STOPPED, State.STARTING)) {
|
if (state.compareAndSet(State.STOPPED, State.STARTING)) {
|
||||||
ClusterState clusterState = initialState;
|
ClusterState clusterState = initialState;
|
||||||
|
// Try to load alert store before the action manager, b/c action depends on alert store
|
||||||
while (true) {
|
while (true) {
|
||||||
if (actionManager.start(clusterState)) {
|
if (alertsStore.start(clusterState)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
clusterState = newClusterState(clusterState);
|
clusterState = newClusterState(clusterState);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (alertsStore.start(clusterState)) {
|
if (actionManager.start(clusterState)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
clusterState = newClusterState(clusterState);
|
clusterState = newClusterState(clusterState);
|
||||||
|
|
Loading…
Reference in New Issue