Today we deserialize and handle all responses from remote clusters on the transport thread. Some of these responses can be sizeable, or require nontrivial work to handle, so we need to move this work to different threads. #97922 introduces a facility for doing so, and forks some work, but in that PR we could not decide whether to handle CCS-related responses on the SEARCH or SEARCH_COORDINATION pool. In order to make progress we left this work on the transport worker for now, but we think this is a bug and this computation should be forked elsewhere. Opening this issue to track that followup work.
Once it's decided where to run this work, here's the only bit that needs changing:
|
// TODO pick a more appropriate executor for this work - see https://github.com/elastic/elasticsearch/issues/97997 |
|
final var remoteClientResponseExecutor = EsExecutors.DIRECT_EXECUTOR_SERVICE; |
Today we deserialize and handle all responses from remote clusters on the transport thread. Some of these responses can be sizeable, or require nontrivial work to handle, so we need to move this work to different threads. #97922 introduces a facility for doing so, and forks some work, but in that PR we could not decide whether to handle CCS-related responses on the
SEARCHorSEARCH_COORDINATIONpool. In order to make progress we left this work on the transport worker for now, but we think this is a bug and this computation should be forked elsewhere. Opening this issue to track that followup work.Once it's decided where to run this work, here's the only bit that needs changing:
elasticsearch/server/src/main/java/org/elasticsearch/action/search/TransportSearchAction.java
Lines 470 to 471 in f4e3113