-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Move can-match thread from transport thread to search coordinator thread #135934
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?
Move can-match thread from transport thread to search coordinator thread #135934
Conversation
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Hi @chrisparrinello, I've created a changelog YAML for you. |
Hi @chrisparrinello, I've updated the changelog YAML for you. |
transportService.registerRequestHandler( | ||
QUERY_ACTION_NAME, | ||
EsExecutors.DIRECT_EXECUTOR_SERVICE, | ||
transportService.getThreadPool().executor(ThreadPool.Names.SEARCH_COORDINATION), |
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 think I see what the intention is here, to move off of the transport thread part of the shard query phase that happens before we fork to search, can you confirm?
The title of the PR refers to can match thread though, while this moves the query action (rather than can match) to search coordination.
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.
SearchService::executeQueryPhase
is an overloaded function. As far as I can tell, the executeQueryPhase
referenced here is performing a can-match (if possible) and if the can-match succeeds, then calls the other executeQueryPhase
function which is doing the normal query phase.
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.
Ugh, we really shouldn't have named two different methods doing different things by one name... But there seems to be four executeQueryPhase
methods, quite confusing tbh. None of them have any explanation on how they differ from others, sigh.
Fixes #134959