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
Add rebalance enabled allocation decider #8190
Conversation
EnableAllocationDecider.this.enable = enable; | ||
Allocation enable = Allocation.parse(settings.get(CLUSTER_ROUTING_ALLOCATION_ENABLE, this.enableAllocation.name())); | ||
if (enable != this.enableAllocation) { | ||
logger.info("updating [cluster.routing.allocation.enable] from [{}] to [{}]", this.enableAllocation, enable); |
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.
Can you change the hardcoded setting name to CLUSTER_ROUTING_ALLOCATION_ENABLE
in case we ever change it in the future?
This LGTM, I left some minor comments, how do you feel about adding an integration test in addition to the unit test? |
I will add an integration test, thanks |
@dakrone addressed all your comments |
@@ -118,6 +118,13 @@ settings API: | |||
* `new_primaries` - Allows shard allocation only for primary shards for new indices. | |||
* `none` - No shard allocation is allowed. | |||
|
|||
`index.routing.rebalance.enable`:: | |||
Enables shard allocation for a specific index. It can be set to: |
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.
I think this needs to be "enables shard rebalancing" , no?
Left a minor grammatical comment, this LGTM |
Whoops, I commented on the "second review round" (806d78d) commit instead of the PR, sorry :-/ |
fixed @dakrone thanks! |
LGTM! |
This commit adds the ability to enable / disable relocations on an entire cluster or on individual indices for either: * `primaries` - only primaries can rebalance * `replica` - only replicas can rebalance * `all` - everything can rebalance (default) * `none` - all rebalances are disabled similar to the allocation enable / disable functionality. Relates to elastic#7288
435e2cd
to
d5c0a49
Compare
What is the status of the support of this feature? Is this available in any versions of ElasticSearch? |
Hi Team, Would this new relocation control directive compliment or replace setting cluster.routing.allocation.cluster_concurrent_rebalance to 0 as in existing ES versions to prevent unwanted relocation activity? Or will it just give more fine grained control over relocation activity than only at cluster level? |
This commit adds the ability to enable / disable relocations
on an entire cluster or on individual indices for either:
primaries
- only primaries can rebalancereplica
- only replicas can rebalanceall
- everything can rebalance (default)none
- all rebalances are disabledsimilar to the allocation enable / disable functionality.
Relates to #7288