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

Executes incremental reduce in the search thread pool (#58461) #60275

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Jul 28, 2020

Backport of #58461

This change forks the execution of partial
reduces in the coordinating node to the search thread pool.
It also ensures that partial reduces are executed sequentially
and asynchronously in order to limit the memory and cpu that a
single search request can use but also to avoid blocking a
network thread.
If a partial reduce fails with an exception, the search
request is cancelled and the reporting of the error is
delayed to the start of the fetch phase (when the final
reduce is performed). This ensures that we cleanup the
in-flight search requests before returning an error to
the user.

Closes elastic#53411
Relates elastic#51857
@jimczi jimczi merged commit 1144534 into elastic:7.x Jul 28, 2020
@jimczi jimczi deleted the partial_reduce_thread_pool_backport branch July 28, 2020 11:40
javanna added a commit to javanna/elasticsearch that referenced this pull request Sep 8, 2020
As part of elastic#60275 QueryPhaseResultConsumer ended up calling SearchProgressListener#onPartialReduce directly instead of notifyPartialReduce. That means we don't catch exceptions that may occur while executing the progress listener callback.

This commit fix the call and adds a test for this scenario.
javanna added a commit that referenced this pull request Sep 8, 2020
As part of #60275 QueryPhaseResultConsumer ended up calling SearchProgressListener#onPartialReduce directly instead of notifyPartialReduce. That means we don't catch exceptions that may occur while executing the progress listener callback.

This commit fixes the call and adds a test for this scenario.
javanna added a commit to javanna/elasticsearch that referenced this pull request Sep 9, 2020
As part of elastic#60275 QueryPhaseResultConsumer ended up calling SearchProgressListener#onPartialReduce directly instead of notifyPartialReduce. That means we don't catch exceptions that may occur while executing the progress listener callback.

This commit fixes the call and adds a test for this scenario.
javanna added a commit that referenced this pull request Sep 9, 2020
As part of #60275 QueryPhaseResultConsumer ended up calling SearchProgressListener#onPartialReduce directly instead of notifyPartialReduce. That means we don't catch exceptions that may occur while executing the progress listener callback.

This commit fixes the call and adds a test for this scenario.
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