-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Add index.routing.allocation.include._tier_preference setting #62589
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
Conversation
This commit adds the `index.routing.allocation.prefer._tier` setting to the `DataTierAllocationDecider`. This special-purpose allocation setting lets a user specify a preference-based list of tiers for an index to be assigned to. For example, if the setting were set to: ``` "index.routing.allocation.prefer._tier": "data_hot,data_warm,data_content" ``` If the cluster contains any nodes with the `data_hot` role, the decider will only allow them to be allocated on the `data_hot` node(s). If there are no `data_hot` nodes, but there are `data_warm` and `data_content` nodes, then the index will be allowed to be allocated on `data_warm` nodes. This allows us to specify an index's preference for tier(s) without causing the index to be unassigned if no nodes of a preferred tier are available. Subsequent work will change the ILM migration to make additional use of this setting. Relates to elastic#60848
Pinging @elastic/es-core-features (:Core/Features/Features) |
Since this setting is not part of the existing preference group, we need to handle backwards compatibility. I think we have a couple of options here:
|
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.
Thanks for working on this Lee.
I've left a couple of rather minor suggestions.
Can you please add some tests to show illustrate the include/exclude/require precedence over preferred
?
.../main/java/org/elasticsearch/xpack/cluster/routing/allocation/DataTierAllocationDecider.java
Outdated
Show resolved
Hide resolved
.../main/java/org/elasticsearch/xpack/cluster/routing/allocation/DataTierAllocationDecider.java
Outdated
Show resolved
Hide resolved
Thanks Andrei, I made the changes you suggested |
@elasticmachine run elasticsearch-ci/packaging-sample-windows |
@elasticmachine update branch |
@elasticmachine test this please |
@elasticmachine run elasticsearch-ci/2 |
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 Lee
This commit adds the `index.routing.allocation.prefer._tier` setting to the `DataTierAllocationDecider`. This special-purpose allocation setting lets a user specify a preference-based list of tiers for an index to be assigned to. For example, if the setting were set to: ``` "index.routing.allocation.prefer._tier": "data_hot,data_warm,data_content" ``` If the cluster contains any nodes with the `data_hot` role, the decider will only allow them to be allocated on the `data_hot` node(s). If there are no `data_hot` nodes, but there are `data_warm` and `data_content` nodes, then the index will be allowed to be allocated on `data_warm` nodes. This allows us to specify an index's preference for tier(s) without causing the index to be unassigned if no nodes of a preferred tier are available. Subsequent work will change the ILM migration to make additional use of this setting. Relates to elastic#60848
…62589) (#62667) This commit adds the `index.routing.allocation.prefer._tier` setting to the `DataTierAllocationDecider`. This special-purpose allocation setting lets a user specify a preference-based list of tiers for an index to be assigned to. For example, if the setting were set to: ``` "index.routing.allocation.prefer._tier": "data_hot,data_warm,data_content" ``` If the cluster contains any nodes with the `data_hot` role, the decider will only allow them to be allocated on the `data_hot` node(s). If there are no `data_hot` nodes, but there are `data_warm` and `data_content` nodes, then the index will be allowed to be allocated on `data_warm` nodes. This allows us to specify an index's preference for tier(s) without causing the index to be unassigned if no nodes of a preferred tier are available. Subsequent work will change the ILM migration to make additional use of this setting. Relates to #60848
This commit adds the
index.routing.allocation.include._tier_preference
setting to theDataTierAllocationDecider
. This special-purpose allocation setting lets a user specify apreference-based list of tiers for an index to be assigned to. For example, if the setting were set
to:
If the cluster contains any nodes with the
data_hot
role, the decider will only allow them to beallocated on the
data_hot
node(s). If there are nodata_hot
nodes, but there aredata_warm
anddata_content
nodes, then the index will be allowed to be allocated ondata_warm
nodes.This allows us to specify an index's preference for tier(s) without causing the index to be
unassigned if no nodes of a preferred tier are available.
Subsequent work will change the ILM migration to make additional use of this setting.
Relates to #60848