[ES|QL] Ensure Inference Service answer using only SEARCH and SEARCH_COORDINATION thread pools.#135071
Merged
afoucret merged 6 commits intoelastic:mainfrom Sep 24, 2025
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
| }, listener::onFailure)); | ||
| final CountDownActionListener countdownListener = new CountDownActionListener( | ||
| inferenceIds.size(), | ||
| ActionListener.wrap(_r -> listener.onResponse(inferenceResolutionBuilder.build()), listener::onFailure) |
Contributor
There was a problem hiding this comment.
NIT: could be simplified with
Suggested change
| ActionListener.wrap(_r -> listener.onResponse(inferenceResolutionBuilder.build()), listener::onFailure) | |
| listener.delegateFailureAndWrap((l, v) -> l.onResponse(inferenceResolutionBuilder.build())) |
Contributor
Author
There was a problem hiding this comment.
Thank you for the advice.
I end up using delegateFailureIgnoreResponseAndWrap instead of delegateFailureIgnoreResponseAndWrap
76a089c to
5ac62cc
Compare
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.
#132324 introduced some check during query planning to make it sure that it is executed in one of the following thread pool:
ThreadPool.Names.SEARCH,ThreadPool.Names.SEARCH_COORDINATIONThreadPool.Names.SYSTEM_READ.#134777 fixed a bug caused by the
InferenceResolverthat were using an inference threadpool to ruturn its response (implicitly because using the client listener).This PR:
InferenceResolverInferenceRunnerwill not be affected if used during the query planning (which will be the case)