-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Short-circuit rebalancing when disabled #40966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Short-circuit rebalancing when disabled #40966
Conversation
Today if `cluster.routing.rebalance.enable: none` then rebalancing is disabled, but we still execute `balanceByWeights()` and perform some rather expensive calculations before discovering that we cannot rebalance any shards. In a large cluster this can make cluster state updates occur rather slowly. With this change we check earlier whether rebalancing is globally disabled and, if so, avoid the rebalancing process entirely. Relates elastic#40942 which was reverted because of egregiously faulty tests.
Pinging @elastic/es-distributed |
.put(CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING.getKey(), | ||
randomFrom(EnableAllocationDecider.Rebalance.ALL, | ||
EnableAllocationDecider.Rebalance.PRIMARIES, | ||
EnableAllocationDecider.Rebalance.REPLICAS).name()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid having to play spot-the-difference, the bug in #40942 was that I was picking values from EnableAllocationDecider.Allocation
which are mostly, but not entirely, the same as these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks @DaveCTurner , also for teaching me a new word!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM2 :)
Today if `cluster.routing.rebalance.enable: none` then rebalancing is disabled, but we still execute `balanceByWeights()` and perform some rather expensive calculations before discovering that we cannot rebalance any shards. In a large cluster this can make cluster state updates occur rather slowly. With this change we check earlier whether rebalancing is globally disabled and, if so, avoid the rebalancing process entirely. Relates #40942 which was reverted because of egregiously faulty tests.
Today if `cluster.routing.rebalance.enable: none` then rebalancing is disabled, but we still execute `balanceByWeights()` and perform some rather expensive calculations before discovering that we cannot rebalance any shards. In a large cluster this can make cluster state updates occur rather slowly. With this change we check earlier whether rebalancing is globally disabled and, if so, avoid the rebalancing process entirely. Relates #40942 which was reverted because of egregiously faulty tests.
Today if `cluster.routing.rebalance.enable: none` then rebalancing is disabled, but we still execute `balanceByWeights()` and perform some rather expensive calculations before discovering that we cannot rebalance any shards. In a large cluster this can make cluster state updates occur rather slowly. With this change we check earlier whether rebalancing is globally disabled and, if so, avoid the rebalancing process entirely. Relates #40942 which was reverted because of egregiously faulty tests.
…forced-unsafe-publication * elastic/master: Improve Watcher test framework resiliency (elastic#40658) Fix order of request body search parameter names in documentation (elastic#40777) Node repurpose tool docs (elastic#40525) [Docs] Delete explanation for completion suggester default analyzer choice (elastic#36720) Revert "Revert "Change HLRC CCR response tests to use AbstractResponseTestCase base class. (elastic#40257)"" (elastic#40971) Short-circuit rebalancing when disabled (elastic#40966)
Today if `cluster.routing.rebalance.enable: none` then rebalancing is disabled, but we still execute `balanceByWeights()` and perform some rather expensive calculations before discovering that we cannot rebalance any shards. In a large cluster this can make cluster state updates occur rather slowly. With this change we check earlier whether rebalancing is globally disabled and, if so, avoid the rebalancing process entirely. Relates elastic#40942 which was reverted because of egregiously faulty tests.
Today if
cluster.routing.rebalance.enable: none
then rebalancing is disabled,but we still execute
balanceByWeights()
and perform some rather expensivecalculations before discovering that we cannot rebalance any shards. In a large
cluster this can make cluster state updates occur rather slowly. With this
change we check earlier whether rebalancing is globally disabled and, if so,
avoid the rebalancing process entirely.
Relates #40942 which was reverted because of egregiously faulty tests.