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

Remove side-effects in streams in PrimaryShardAllocator #89218

Merged

Conversation

arteam
Copy link
Contributor

@arteam arteam commented Aug 9, 2022

map should be a side-effect free function, because it's a non-terminal operation.
If we want to have side effect, we should use forEach which is terminal.

`map` should be a side-effect free function, because it's a non-terminal operation.
If we want to have side effect, we should use `forEach` which is terminal.
@arteam
Copy link
Contributor Author

arteam commented Aug 9, 2022

@elasticmachine update branch

@arteam arteam marked this pull request as ready for review August 17, 2022 11:34
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Aug 17, 2022
@arteam arteam added :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. >non-issue >refactoring labels Aug 17, 2022
@elasticsearchmachine elasticsearchmachine added Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. and removed needs:triage Requires assignment of a team area label labels Aug 17, 2022
@elasticsearchmachine
Copy link
Collaborator

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

@arteam arteam merged commit f1071ca into elastic:main Aug 17, 2022
@arteam
Copy link
Contributor Author

arteam commented Aug 17, 2022

Thanks Armin!

@arteam arteam deleted the primary-shard-allocator-no-side-effects-in-map branch August 17, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. >non-issue >refactoring Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants