Skip to content

Commit 9681ffe

Browse files
authored
Permit ml thread in esql (#132543)
1 parent 25e4a06 commit 9681ffe

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import org.elasticsearch.xpack.esql.session.Configuration;
6666
import org.elasticsearch.xpack.esql.session.EsqlCCSUtils;
6767
import org.elasticsearch.xpack.esql.session.Result;
68+
import org.elasticsearch.xpack.ml.MachineLearning;
6869

6970
import java.util.ArrayList;
7071
import java.util.Collections;
@@ -196,7 +197,8 @@ public void execute(
196197
TcpTransport.TRANSPORT_WORKER_THREAD_NAME_PREFIX,
197198
ThreadPool.Names.SYSTEM_READ,
198199
ThreadPool.Names.SEARCH,
199-
ThreadPool.Names.SEARCH_COORDINATION
200+
ThreadPool.Names.SEARCH_COORDINATION,
201+
MachineLearning.NATIVE_INFERENCE_COMMS_THREAD_POOL_NAME
200202
);
201203
Tuple<List<PhysicalPlan>, PhysicalPlan> subplansAndMainPlan = PlannerUtils.breakPlanIntoSubPlansAndMainPlan(physicalPlan);
202204

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/DataNodeRequestSender.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.elasticsearch.transport.TransportRequestOptions;
4040
import org.elasticsearch.transport.TransportService;
4141
import org.elasticsearch.xpack.esql.action.EsqlSearchShardsAction;
42+
import org.elasticsearch.xpack.ml.MachineLearning;
4243

4344
import java.util.ArrayList;
4445
import java.util.Collections;
@@ -135,7 +136,8 @@ final void startComputeOnDataNodes(Set<String> concreteIndices, Runnable runOnTa
135136
TcpTransport.TRANSPORT_WORKER_THREAD_NAME_PREFIX,
136137
ThreadPool.Names.SYSTEM_READ,
137138
ThreadPool.Names.SEARCH,
138-
ThreadPool.Names.SEARCH_COORDINATION
139+
ThreadPool.Names.SEARCH_COORDINATION,
140+
MachineLearning.NATIVE_INFERENCE_COMMS_THREAD_POOL_NAME
139141
);
140142
final long startTimeInNanos = System.nanoTime();
141143
searchShards(concreteIndices, ActionListener.wrap(targetShards -> {

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
import org.elasticsearch.xpack.esql.planner.premapper.PreMapper;
7777
import org.elasticsearch.xpack.esql.plugin.TransportActionServices;
7878
import org.elasticsearch.xpack.esql.telemetry.PlanTelemetry;
79+
import org.elasticsearch.xpack.ml.MachineLearning;
7980

8081
import java.util.ArrayList;
8182
import java.util.Collection;
@@ -202,7 +203,8 @@ public void executeOptimizedPlan(
202203
TcpTransport.TRANSPORT_WORKER_THREAD_NAME_PREFIX,
203204
ThreadPool.Names.SYSTEM_READ,
204205
ThreadPool.Names.SEARCH,
205-
ThreadPool.Names.SEARCH_COORDINATION
206+
ThreadPool.Names.SEARCH_COORDINATION,
207+
MachineLearning.NATIVE_INFERENCE_COMMS_THREAD_POOL_NAME
206208
);
207209
if (explainMode) {// TODO: INLINESTATS come back to the explain mode branch and reevaluate
208210
PhysicalPlan physicalPlan = logicalPlanToPhysicalPlan(optimizedPlan, request);

0 commit comments

Comments
 (0)