Skip to content

Commit 35ca606

Browse files
comment
1 parent 75b16d6 commit 35ca606

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/action/search/SearchQueryThenFetchAsyncAction.java

+2
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ static void registerNodeSearchAction(
558558
var transportService = searchTransportService.transportService();
559559
var threadPool = transportService.getThreadPool();
560560
final Dependencies dependencies = new Dependencies(searchService, threadPool.executor(ThreadPool.Names.SEARCH));
561+
// Even though not all searches run on the search pool, we use the search pool size as the upper limit of shards to execute in
562+
// parallel to keep the implementation simple instead of working out the exact pool(s) a query will use up-front.
561563
final int searchPoolMax = threadPool.info(ThreadPool.Names.SEARCH).getMax();
562564
transportService.registerRequestHandler(
563565
NODE_SEARCH_ACTION_NAME,

0 commit comments

Comments
 (0)