mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
do a reroute when a node becomes master
This commit is contained in:
parent
f6255f8ad9
commit
23ddf8bc53
@ -81,6 +81,8 @@ public class RoutingService extends AbstractLifecycleComponent<RoutingService> i
|
||||
if (event.state().nodes().localNodeMaster()) {
|
||||
// we are master, schedule the routing table updater
|
||||
if (scheduledRoutingTableFuture == null) {
|
||||
// a new master (us), make sure we reroute shards
|
||||
routingTableDirty = true;
|
||||
scheduledRoutingTableFuture = threadPool.scheduleWithFixedDelay(new RoutingTableUpdater(), schedule);
|
||||
}
|
||||
if (event.nodesRemoved() || event.routingTableChanged()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user