-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add a listener to track the progress of a search request locally #49471
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
Pinging @elastic/es-search (:Search/Search) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me.
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
…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
) (#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
server/src/main/java/org/elasticsearch/action/search/SearchProgressListener.java
Show resolved
Hide resolved
} | ||
} | ||
|
||
final List<SearchShard> searchShards(List<? extends SearchPhaseResult> results) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make these methods static and rename them to buildSearchShards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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