Skip to content
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

Merged
merged 1 commit into from Oct 23, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Oct 22, 2014

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 #7288

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);
Copy link
Member

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?

@dakrone
Copy link
Member

dakrone commented Oct 22, 2014

This LGTM, I left some minor comments, how do you feel about adding an integration test in addition to the unit test?

@dakrone dakrone removed the review label Oct 22, 2014
@s1monw
Copy link
Contributor Author

s1monw commented Oct 22, 2014

I will add an integration test, thanks

@s1monw
Copy link
Contributor Author

s1monw commented Oct 22, 2014

@dakrone addressed all your comments

@s1monw s1monw added the review label Oct 22, 2014
@s1monw s1monw self-assigned this Oct 22, 2014
@@ -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:
Copy link
Contributor

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?

@dakrone
Copy link
Member

dakrone commented Oct 23, 2014

Left a minor grammatical comment, this LGTM

@s1monw
Copy link
Contributor Author

s1monw commented Oct 23, 2014

addressed all your comments @bleskes @dakrone can you take another look

@dakrone
Copy link
Member

dakrone commented Oct 23, 2014

Whoops, I commented on the "second review round" (806d78d) commit instead of the PR, sorry :-/

@s1monw
Copy link
Contributor Author

s1monw commented Oct 23, 2014

fixed @dakrone thanks!

@dakrone
Copy link
Member

dakrone commented Oct 23, 2014

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
@cfeio
Copy link

cfeio commented Feb 17, 2015

What is the status of the support of this feature? Is this available in any versions of ElasticSearch?

@clintongormley clintongormley changed the title [ROUTING] Add rebalance enabled allocation decider Add rebalance enabled allocation decider Jun 6, 2015
@geekpete
Copy link
Member

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?

@lcawl lcawl added :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. and removed :Allocation labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. :Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. >enhancement v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants