-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Skip zone/host awareness with auto-expand replicas #69334
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
Skip zone/host awareness with auto-expand replicas #69334
Conversation
Today if an index is set to `auto_expand_replicas: N-all` then we will try and create a shard copy on every node that matches the applicable allocation filters. This conflits with shard allocation awareness and the same-host allocation decider if there is an uneven distribution of nodes across zones or hosts, since these deciders prevent shard copies from being allocated unevenly and may therefore leave some unassigned shards. The point of these two deciders is to improve resilience given a limited number of shard copies but there is no need for this behaviour when the number of shard copies is not limited, so this commit supresses them in that case. Closes elastic#54151 Closes elastic#2869
Pinging @elastic/es-distributed (Team:Distributed) |
I'm saying that this closes #2869 because I could not see anything in the comments or issues linked to that issue that would still be worth addressing after this change. In general I don't see a use for setting |
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 (one Q)
and <<allocation-total-shards,total shards per node>>, and this can lead to the | ||
cluster health becoming `YELLOW` if the applicable rules prevent all the replicas | ||
from being allocated. | ||
Auto-expand the number of replicas based on the number of data nodes in the |
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.
Why remove the indentation? Does this still display properly?
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 don't know if it's possible to add paragraph breaks (the +
on its own line) to one of these blocks of text otherwise.
Today if an index is set to `auto_expand_replicas: N-all` then we will try and create a shard copy on every node that matches the applicable allocation filters. This conflits with shard allocation awareness and the same-host allocation decider if there is an uneven distribution of nodes across zones or hosts, since these deciders prevent shard copies from being allocated unevenly and may therefore leave some unassigned shards. The point of these two deciders is to improve resilience given a limited number of shard copies but there is no need for this behaviour when the number of shard copies is not limited, so this commit supresses them in that case. Closes #54151 Closes #2869
Today we count `null` (i.e. missing) as a valid attribute value in allocation awareness, even though allocation awareness forbids the allocation of shards to such a node. Prior to elastic#69334 this didn't matter, a data node without allocation attributes was pointless. However, elastic#69334 means we now can allocate shards to such a node: for instance, there is no need for nodes holding only enrich indices to have allocation attributes. Therefore we should stop counting `null` as one of the attribute values.
Today we count `null` (i.e. missing) as a valid attribute value in allocation awareness, even though allocation awareness forbids the allocation of shards to such a node. Prior to #69334 this didn't matter, a data node without allocation attributes was pointless. However, #69334 means we now can allocate shards to such a node: for instance, there is no need for nodes holding only enrich indices to have allocation attributes. Therefore we should stop counting `null` as one of the attribute values.
Today we count `null` (i.e. missing) as a valid attribute value in allocation awareness, even though allocation awareness forbids the allocation of shards to such a node. Prior to #69334 this didn't matter, a data node without allocation attributes was pointless. However, #69334 means we now can allocate shards to such a node: for instance, there is no need for nodes holding only enrich indices to have allocation attributes. Therefore we should stop counting `null` as one of the attribute values.
Today if an index is set to
auto_expand_replicas: N-all
then we willtry and create a shard copy on every node that matches the applicable
allocation filters. This conflits with shard allocation awareness and
the same-host allocation decider if there is an uneven distribution of
nodes across zones or hosts, since these deciders prevent shard copies
from being allocated unevenly and may therefore leave some unassigned
shards.
The point of these two deciders is to improve resilience given a limited
number of shard copies but there is no need for this behaviour when the
number of shard copies is not limited, so this commit supresses them in
that case.
Closes #54151
Closes #2869