Foreach processor - fork recursive call #50514
Merged
jakelandis merged 9 commits intoelastic:masterfrom Jan 8, 2020
Merged
Conversation
|
hi @jakelandis this |
Contributor
Author
|
@drsantos20 - not yet, while functional (as-is) it is introducing a bit more blocking then I would like. I am still exploring the options. |
This reverts commit 56994bc75ba5ccb5b5a6b4b5972a4d1c22807eb5.
A very large number of recursive calls can cause a stack overflow exception. This commit forks the recursive calls for non-async processors.
56994bc to
fa44262
Compare
Collaborator
|
Pinging @elastic/es-core-features (:Core/Features/Ingest) |
Contributor
Author
|
test failure due to: #50497 |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/2 |
martijnvg
approved these changes
Jan 6, 2020
Member
martijnvg
left a comment
There was a problem hiding this comment.
Left two minor comments, otherwise LGTM.
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/ForEachProcessor.java
Show resolved
Hide resolved
martijnvg
reviewed
Jan 7, 2020
martijnvg
reviewed
Jan 7, 2020
modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/ForEachProcessorTests.java
Show resolved
Hide resolved
Contributor
Author
|
@elasticmachine test this please |
Contributor
Author
|
@elasticmachine run all the tests |
Contributor
Author
|
closing and re-opening in an attempt to get the tests to run. |
jakelandis
added a commit
to jakelandis/elasticsearch
that referenced
this pull request
Jan 8, 2020
A very large number of recursive calls can cause a stack overflow exception. This commit forks the recursive calls for non-async processors. Once forked, each thread will handle at most 10 recursive calls to help keep the stack size and thread count down to a reasonable size.
jakelandis
added a commit
that referenced
this pull request
Jan 9, 2020
A very large number of recursive calls can cause a stack overflow exception. This commit forks the recursive calls for non-async processors. Once forked, each thread will handle at most 10 recursive calls to help keep the stack size and thread count down to a reasonable size.
jakelandis
added a commit
to jakelandis/elasticsearch
that referenced
this pull request
Jan 9, 2020
A very large number of recursive calls can cause a stack overflow exception. This commit forks the recursive calls for non-async processors. Once forked, each thread will handle at most 10 recursive calls to help keep the stack size and thread count down to a reasonable size.
jakelandis
added a commit
that referenced
this pull request
Jan 9, 2020
A very large number of recursive calls can cause a stack overflow exception. This commit forks the recursive calls for non-async processors. Once forked, each thread will handle at most 10 recursive calls to help keep the stack size and thread count down to a reasonable size.
probakowski
added a commit
to probakowski/elasticsearch
that referenced
this pull request
Jan 16, 2020
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
added a commit
that referenced
this pull request
Jan 21, 2020
* 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 #50514
probakowski
added a commit
that referenced
this pull request
Jan 22, 2020
…#51104) (#51322) * Refactor ForEachProcessor to use iteration instead of recursion (#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 #50514 * Update IngestCommonPlugin.java
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
A very large number of recursive calls can cause a stack overflow exception. This commit forks the recursive calls for non-async processors. Once forked, each thread will handle at most 10 recursive calls to help keep the stack size and thread count down to a reasonable size.
This was referenced Feb 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A very large number of recursive calls can cause a stack overflow
exception. This commit forks the recursive calls for non-async
processors.