Add a listener to track the progress of a search request locally#49471
Merged
jimczi merged 16 commits intoelastic:masterfrom Nov 28, 2019
Merged
Add a listener to track the progress of a search request locally#49471jimczi merged 16 commits intoelastic:masterfrom
jimczi merged 16 commits intoelastic:masterfrom
Conversation
…tled searches (elastic#42510)" This reverts commit dd1ce50.
This commit adds a function in NodeClient that allows to track the progress of a search request locally. Progress is tracked through a SearchProgressListener that exposes query and fetch responses as well as partial and final reduces. This new method can be used by modules/plugins inside a node in order to track the progress of a local search request. Relates elastic#49091
Collaborator
|
Pinging @elastic/es-search (:Search/Search) |
jpountz
approved these changes
Nov 26, 2019
server/src/main/java/org/elasticsearch/action/search/SearchProgressListener.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/search/SearchProgressListener.java
Outdated
Show resolved
Hide resolved
jimczi
added a commit
to jimczi/elasticsearch
that referenced
this pull request
Nov 28, 2019
…stic#49471) This commit adds a function in NodeClient that allows to track the progress of a search request locally. Progress is tracked through a SearchProgressListener that exposes query and fetch responses as well as partial and final reduces. This new method can be used by modules/plugins inside a node in order to track the progress of a local search request. Relates elastic#49091
jimczi
added a commit
that referenced
this pull request
Nov 28, 2019
) (#49691) This commit adds a function in NodeClient that allows to track the progress of a search request locally. Progress is tracked through a SearchProgressListener that exposes query and fetch responses as well as partial and final reduces. This new method can be used by modules/plugins inside a node in order to track the progress of a local search request. Relates #49091
This was referenced Feb 3, 2020
javanna
reviewed
Mar 3, 2020
javanna
reviewed
Mar 3, 2020
javanna
reviewed
Mar 3, 2020
javanna
reviewed
Mar 3, 2020
server/src/main/java/org/elasticsearch/action/search/SearchProgressListener.java
Show resolved
Hide resolved
javanna
reviewed
Mar 3, 2020
| } | ||
| } | ||
|
|
||
| final List<SearchShard> searchShards(List<? extends SearchPhaseResult> results) { |
Contributor
There was a problem hiding this comment.
I would make these methods static and rename them to buildSearchShards
Contributor
There was a problem hiding this comment.
I have opened #53373 to address these comments I left last week (besides the one on concurrency that I need to have a closer look at), plus a few other things.
javanna
reviewed
Mar 3, 2020
server/src/main/java/org/elasticsearch/action/search/SearchProgressListener.java
Show resolved
Hide resolved
javanna
reviewed
Mar 3, 2020
server/src/main/java/org/elasticsearch/action/search/SearchProgressListener.java
Show resolved
Hide resolved
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.
This commit adds a function in NodeClient that allows to track the progress
of a search request locally. Progress is tracked through a SearchProgressListener
that exposes query and fetch responses as well as partial and final reduces.
This new method can be used by modules/plugins inside a node in order to track the
progress of a local search request.
Notes for reviewer:
We cannot track the progress efficiently if the request is splitted into read-only and write indices.
This optimization is also not effective since it doesn't protect against the lost of a context if read-only indices are slow to answer, hence the revert.
This is needed to add the search progress listener in the main SearchTask.
Relates #49091