-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Allow QueryRewriteContext to perform async actions on remote clusters #138124
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
base: main
Are you sure you want to change the base?
Conversation
|
Pinging @elastic/search-relevance (Team:Search - Relevance) |
| // TODO: Need to make a copy of remoteAsyncActions? | ||
| for (var entry : remoteAsyncActions.entrySet()) { |
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 see that asyncActions is copied to prevent concurrent modification. Do we need to do the same for remoteAsyncActions?
|
|
||
| RemoteClusterClient remoteClient = client.getRemoteClusterClient( | ||
| clusterAlias, | ||
| client.threadPool().executor(SEARCH_COORDINATION), // TODO: Is this the right thread pool for remote async actions? |
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.
SEARCH_COORDINATION was my best guess, LMK if there's a more appropriate thread pool to use.
Adds methods to
QueryRewriteContextfor registering and executing remote cluster async actions as part of the query rewrite process.This functionality will be used by the
semanticand intercepted (match/sparse_vector/knn) queries to get remote cluster inference results when performing CCS withccs_minimize_roundtrips=false. It will also be used by the simplifiedlinear/rrfretrievers to handle CCS. See the semantic search CCS POC for more context.Both of these use cases will be implemented in follow-up PRs.