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

[7.x] Refactor ForEachProcessor to use iteration instead of recursion (#51104) #51322

Merged
merged 2 commits into from
Jan 22, 2020

Conversation

probakowski
Copy link
Contributor

Backports the following commits to 7.x:

…tic#51104)

* Refactor ForEachProcessor to use iteration instead of recursion

This change makes ForEachProcessor iterative and still non-blocking.
In case of non-async processors we use single for loop and no recursion at all.
In case of async processors we continue work on either current thread or thread
started by downstream processor, whichever is slower (usually processor thread).
Everything is synchronised by single atomic variable.

Relates elastic#50514
@probakowski probakowski merged commit 3fb7ad0 into elastic:7.x Jan 22, 2020
@probakowski probakowski deleted the backport/7.x/pr-51104 branch January 22, 2020 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant