Skip to content

Convert shardsWithState to return stream#92063

Merged
idegtiarenko merged 4 commits intoelastic:mainfrom
idegtiarenko:simplify_shardsWithState_3
Dec 5, 2022
Merged

Convert shardsWithState to return stream#92063
idegtiarenko merged 4 commits intoelastic:mainfrom
idegtiarenko:simplify_shardsWithState_3

Conversation

@idegtiarenko
Copy link
Copy Markdown
Contributor

Another followup to #91991

This changes a return type to Stream to avoid needless lists copying

@idegtiarenko idegtiarenko added >non-issue :Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) Team:Distributed Meta label for distributed team. v8.7.0 labels Dec 2, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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


public ShardRouting[] started() {
return startedShards.toArray(EMPTY_SHARD_ROUTING_ARRAY);
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those are not changed, only reordered methods

Copy link
Copy Markdown
Member

@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.

LGTM

@idegtiarenko idegtiarenko merged commit 1f1443a into elastic:main Dec 5, 2022
@idegtiarenko idegtiarenko deleted the simplify_shardsWithState_3 branch December 5, 2022 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >non-issue Team:Distributed Meta label for distributed team. v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants