When a node is leaving LocalDiscovery cluster, rerouting should be performed on the master node
This commit is contained in:
parent
d126558dec
commit
f96c1f1e10
|
@ -220,7 +220,7 @@ public class LocalDiscovery extends AbstractLifecycleComponent<Discovery> implem
|
||||||
}
|
}
|
||||||
// reroute here, so we eagerly remove dead nodes from the routing
|
// reroute here, so we eagerly remove dead nodes from the routing
|
||||||
ClusterState updatedState = newClusterStateBuilder().state(currentState).nodes(newNodes).build();
|
ClusterState updatedState = newClusterStateBuilder().state(currentState).nodes(newNodes).build();
|
||||||
RoutingAllocation.Result routingResult = allocationService.reroute(newClusterStateBuilder().state(updatedState).build());
|
RoutingAllocation.Result routingResult = master.allocationService.reroute(newClusterStateBuilder().state(updatedState).build());
|
||||||
return newClusterStateBuilder().state(updatedState).routingResult(routingResult).build();
|
return newClusterStateBuilder().state(updatedState).routingResult(routingResult).build();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue