Class TransportEsqlQueryAction
- All Implemented Interfaces:
AsyncTaskManagementService.AsyncOperation<EsqlQueryRequest,EsqlQueryResponse, EsqlQueryTask>
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportEsqlQueryAction(TransportService transportService, ActionFilters actionFilters, PlanExecutor planExecutor, SearchService searchService, ExchangeService exchangeService, ClusterService clusterService, ViewResolver viewResolver, ProjectResolver projectResolver, ThreadPool threadPool, BigArrays bigArrays, BlockFactoryProvider blockFactoryProvider, Client client, NamedWriteableRegistry registry, IndexNameExpressionResolver indexNameExpressionResolver, UsageService usageService, UserAgentParserRegistry userAgentParserRegistry, IpLocationService ipLocationService, ActionLoggingFieldsProvider fieldProvider, ActivityLogWriterProvider logWriterProvider, CrossProjectModeDecider crossProjectModeDecider) -
Method Summary
Modifier and TypeMethodDescriptioncreateTask(EsqlQueryRequest request, long id, String type, String action, TaskId parentTaskId, Map<String, String> headers, Map<String, String> originHeaders, AsyncExecutionId asyncExecutionId) protected voiddoExecute(Task task, EsqlQueryRequest request, ActionListener<EsqlQueryResponse> listener) voidexecute(EsqlQueryRequest request, EsqlQueryTask task, ActionListener<EsqlQueryResponse> listener) protected ExecutorExecutor for external blob-store access: connector handshakes, registry wiring, source resolution (glob expansion, footer reads, schema reconciliation performed byExternalSourceResolver), and the blocking data reads and streaming parse pipeline routed throughOperatorFactoryRegistry.fileReadExecutor.protected intMaximum number of in-flight per-file metadata (footer) reads a single multi-file resolution may have outstanding, passed toExternalSourceResolveras its fan-out bound.initialResponse(EsqlQueryTask task) voidonFailureAfterTimeout(Exception exception) voidonResponseAfterTimeout(EsqlQueryResponse response) readResponse(StreamInput inputStream) Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Constructor Details
-
TransportEsqlQueryAction
@Inject public TransportEsqlQueryAction(TransportService transportService, ActionFilters actionFilters, PlanExecutor planExecutor, SearchService searchService, ExchangeService exchangeService, ClusterService clusterService, ViewResolver viewResolver, ProjectResolver projectResolver, ThreadPool threadPool, BigArrays bigArrays, BlockFactoryProvider blockFactoryProvider, Client client, NamedWriteableRegistry registry, IndexNameExpressionResolver indexNameExpressionResolver, UsageService usageService, UserAgentParserRegistry userAgentParserRegistry, IpLocationService ipLocationService, ActionLoggingFieldsProvider fieldProvider, ActivityLogWriterProvider logWriterProvider, CrossProjectModeDecider crossProjectModeDecider)
-
-
Method Details
-
externalBlobStoreExecutor
Executor for external blob-store access: connector handshakes, registry wiring, source resolution (glob expansion, footer reads, schema reconciliation performed byExternalSourceResolver), and the blocking data reads and streaming parse pipeline routed throughOperatorFactoryRegistry.fileReadExecutor.Backed by
EsqlPlugin.externalBlobStorePool()— the dedicatedesql_external_ioscaling pool, sized0..ExternalSourceSettings.blobStoreConcurrency(org.elasticsearch.common.settings.Settings)(the single CPU-scaled concurrency knob). It is deliberately separate from theesql_workercompute pool (EsqlPlugin.computePool()): the blocking parse pipeline (segmentator + parser tasks) must not occupy the same threads as the compute drivers that consume its output, or the parser starves its consumer and deadlocks the query. Isolated fromThreadPool.Names.SEARCHto prevent heavy external queries (glob expansion over thousands of files, S3 footer reads) from starving regular ES searches — the reported production regression. The resolver's join pattern needs up toMAX_PARALLEL_METADATA_READS + 1running slots; on nodes where that exceeds the pool size theBoundedParallelGatherrunner throttles submission rather than overflowing the queue, and on saturation across concurrent ES|QL queries it fails fast per-slot rather than deadlocking. In-flight cloud API calls are additionally bounded by the per-scheme permit semaphore inStorageProviderRegistry— permits govern concurrency fairness, the pool governs thread isolation.This method is the coordinator-side hook: overriding it lets tests or a future re-routing move external blob-store access to a different pool without touching call sites.
-
externalSourceConcurrency
protected int externalSourceConcurrency()Maximum number of in-flight per-file metadata (footer) reads a single multi-file resolution may have outstanding, passed toExternalSourceResolveras its fan-out bound. Because footer reads are async (theesql_workerthread is released across the read), this caps concurrent in-flight reads rather than pinning that many threads, so the bound may safely exceed the pool size. It is the sharedExternalSourceSettings.blobStoreConcurrency(org.elasticsearch.common.settings.Settings)value — the single effective blob-store access concurrency that the data-read path also reads — so discovery throttles its footer fan-out with the same node-size-scaled formula (snapshot_metashape, capped at 100, and any operator override once that setting lands) instead of the rawesql_worker.getMax()pool size. -
doExecute
protected void doExecute(Task task, EsqlQueryRequest request, ActionListener<EsqlQueryResponse> listener) - Specified by:
doExecutein classTransportAction<EsqlQueryRequest,EsqlQueryResponse>
-
execute
public void execute(EsqlQueryRequest request, EsqlQueryTask task, ActionListener<EsqlQueryResponse> listener) - Specified by:
executein interfaceAsyncTaskManagementService.AsyncOperation<EsqlQueryRequest,EsqlQueryResponse, EsqlQueryTask>
-
onResponseAfterTimeout
- Specified by:
onResponseAfterTimeoutin interfaceAsyncTaskManagementService.AsyncOperation<EsqlQueryRequest,EsqlQueryResponse, EsqlQueryTask>
-
onFailureAfterTimeout
- Specified by:
onFailureAfterTimeoutin interfaceAsyncTaskManagementService.AsyncOperation<EsqlQueryRequest,EsqlQueryResponse, EsqlQueryTask>
-
exchangeService
-
enrichLookupService
-
createTask
public EsqlQueryTask createTask(EsqlQueryRequest request, long id, String type, String action, TaskId parentTaskId, Map<String, String> headers, Map<String, String> originHeaders, AsyncExecutionId asyncExecutionId) - Specified by:
createTaskin interfaceAsyncTaskManagementService.AsyncOperation<EsqlQueryRequest,EsqlQueryResponse, EsqlQueryTask>
-
initialResponse
- Specified by:
initialResponsein interfaceAsyncTaskManagementService.AsyncOperation<EsqlQueryRequest,EsqlQueryResponse, EsqlQueryTask>
-
readResponse
- Specified by:
readResponsein interfaceAsyncTaskManagementService.AsyncOperation<EsqlQueryRequest,EsqlQueryResponse, EsqlQueryTask> - Throws:
IOException
-
getLookupFromIndexService
-