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

Replace RoutingTable#shardsWithState(...) with RoutingNodes#unassigned(...) #78931

Conversation

martijnvg
Copy link
Member

@martijnvg martijnvg commented Oct 11, 2021

Replaces only the production use cases of RoutingTable#shardsWithState(...).

Relates to #77466

@martijnvg martijnvg 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.16.0 labels Oct 11, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Oct 11, 2021
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

Could we use RoutingNodes#unassigned() to iterate over the unassigned shards directly rather than copying them to an intermediate list first?

@martijnvg
Copy link
Member Author

Could we use RoutingNodes#unassigned() to iterate over the unassigned shards directly rather than copying them to an intermediate list first?

Yes, pushed via: 9f88b6e

Copy link
Member

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM!

@martijnvg
Copy link
Member Author

@elasticmachine run elasticsearch-ci/docs

@martijnvg martijnvg merged commit 9702d3f into elastic:master Oct 12, 2021
@martijnvg martijnvg changed the title Replace RoutingTable#shardsWithState(...) with RoutingNodes#shardsWithState(...) Replace RoutingTable#shardsWithState(...) with RoutingNodes#unassigned(...) Oct 12, 2021
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Oct 12, 2021
…d(...) (elastic#78931)

Replaces only the production use cases of `RoutingTable#shardsWithState(...)` with `RoutingNodes#unassigned()`.

Relates to elastic#77466
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
7.x

elasticsearchmachine pushed a commit that referenced this pull request Oct 12, 2021
…d(...) (#78931) (#78956)

Replaces only the production use cases of `RoutingTable#shardsWithState(...)` with `RoutingNodes#unassigned()`.

Relates to #77466
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.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants