Skip to content

Improve awareness allocation explanation #69371

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

Merged

Conversation

DaveCTurner
Copy link
Contributor

Users sometimes struggle with unassigned shards due to the awareness
decider, especially if the decider is using more zones than expected
(e.g. a typo in an attribute value, or a stale forced-awareness config).
It is hard to see why there are more zones than expected, or even really
to tell from the message that this is the problem.

This commit adds detail about the names of the zones that the allocation
decider is using, so that users can see for themselves whether that is
the source of the problem, and rewords it slightly to make it easier to
understand.

Users sometimes struggle with unassigned shards due to the awareness
decider, especially if the decider is using more zones than expected
(e.g. a typo in an attribute value, or a stale forced-awareness config).
It is hard to see why there are more zones than expected, or even really
to tell from the message that this is the problem.

This commit adds detail about the names of the zones that the allocation
decider is using, so that users can see for themselves whether that is
the source of the problem, and rewords it slightly to make it easier to
understand.
@DaveCTurner DaveCTurner added >enhancement :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) v8.0.0 v7.13.0 labels Feb 22, 2021
@DaveCTurner DaveCTurner requested a review from ywelsch February 22, 2021 17:14
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Feb 22, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

testExplanation(Settings.builder()
.put(AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_ATTRIBUTE_SETTING.getKey(), "zone"),
n -> n.add(newNode("X-0", emptyMap())),
"there are [5] copies of this shard and [3] values for attribute [zone] ([<missing>, a, b] from nodes in the cluster and " +
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On reflection I think this is a bug, we should be ignoring nulls completely, and although it didn't really matter in the past it does matter now. I opened #69374.

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DaveCTurner DaveCTurner merged commit 1a8f227 into elastic:master Feb 23, 2021
@DaveCTurner DaveCTurner deleted the 2021-02-22-awareness-allocation-message branch February 23, 2021 18:52
DaveCTurner added a commit that referenced this pull request Feb 23, 2021
Users sometimes struggle with unassigned shards due to the awareness
decider, especially if the decider is using more zones than expected
(e.g. a typo in an attribute value, or a stale forced-awareness config).
It is hard to see why there are more zones than expected, or even really
to tell from the message that this is the problem.

This commit adds detail about the names of the zones that the allocation
decider is using, so that users can see for themselves whether that is
the source of the problem, and rewords it slightly to make it easier to
understand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >enhancement Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants