Short-circuit rebalancing when disabled#40966
Merged
DaveCTurner merged 1 commit intoelastic:masterfrom Apr 9, 2019
Merged
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.
Collaborator
|
Pinging @elastic/es-distributed |
DaveCTurner
commented
Apr 8, 2019
| .put(CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING.getKey(), | ||
| randomFrom(EnableAllocationDecider.Rebalance.ALL, | ||
| EnableAllocationDecider.Rebalance.PRIMARIES, | ||
| EnableAllocationDecider.Rebalance.REPLICAS).name()), |
Member
Author
There was a problem hiding this comment.
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.
henningandersen
approved these changes
Apr 8, 2019
Contributor
henningandersen
left a comment
There was a problem hiding this comment.
LGTM.
Thanks @DaveCTurner , also for teaching me a new word!
DaveCTurner
added a commit
that referenced
this pull request
Apr 9, 2019
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.
DaveCTurner
added a commit
that referenced
this pull request
Apr 9, 2019
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.
DaveCTurner
added a commit
that referenced
this pull request
Apr 9, 2019
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.
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Apr 9, 2019
…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)
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this pull request
May 27, 2019
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today if
cluster.routing.rebalance.enable: nonethen 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.