-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Do not run ES|QL planning and scheduling on transport thread #133313
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
Do not run ES|QL planning and scheduling on transport thread #133313
Conversation
|
Hi @idegtiarenko, I've created a changelog YAML for you. |
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
dnhatn
left a comment
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.
One small ask, but LGTM. Thanks @idegtiarenko.
| private void queryRewrite(LogicalPlan plan, ActionListener<LogicalPlan> listener) { | ||
| QueryBuilderResolver.resolveQueryBuilders(plan, services, listener); | ||
| // see https://github.com/elastic/elasticsearch/issues/133312 | ||
| // ThreadedActionListener might be removed if above issue is resolved |
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.
Can we use SubscribableListener instead of ThreadedActionListener so that we only fork after going async?
SubscribableListener<LogicalPlan> sub = new SubscribableListener<>();
QueryBuilderResolver.resolveQueryBuilders(plan, services, sub);
sub.addListener(listener, searchExecutor, null);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.
Let me try this
nik9000
left a comment
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.
LGTM. I'm happy when Nhat's happy.
| ThreadPool.Names.SEARCH, | ||
| ThreadPool.Names.SEARCH_COORDINATION, | ||
| MachineLearning.NATIVE_INFERENCE_COMMS_THREAD_POOL_NAME | ||
| 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.
Nice!
💔 Backport failed
You can use sqren/backport to manually backport by running |
This change forks execution to search thread after
preMapperto avoid running on transport and ml threads.This is a simpler version of #132981 that is intended to be backported to 8.19
Related to: #131799
Related to: #133312