elasticsearch/server
Nhat Nguyen 6bf2c7159b
Limit concurrent shards per node for ESQL (#104832)
Today, we allow ESQL to execute against an unlimited number of shards
concurrently on each node. This can lead to cases where we open and hold
too many shards, equivalent to opening too many file descriptors or
using too much memory for FieldInfos in ValuesSourceReaderOperator.

This change limits the number of concurrent shards to 10 per node. This
number was chosen based on the _search API, which limits it to 5.
Besides the primary reason stated above, this change has other
implications:

We might execute fewer shards for queries with LIMIT only, leading to
scenarios where we execute only some high-priority shards then stop.
For now, we don't have a partial reduce at the node level, but if we
introduce one in the future, it might not be as efficient as executing
all shards at the same time.  There are pauses between batches because
batches are executed sequentially one by one.  However, I believe the
performance of queries executing against many shards (after can_match)
is less important than resiliency.

Closes #103666
Backport of #104832
2024-01-30 11:24:05 -08:00
..
licenses Implement custom JUL bridge (#96872) 2023-06-20 09:48:25 -07:00
src Limit concurrent shards per node for ESQL (#104832) 2024-01-30 11:24:05 -08:00
build.gradle Add ability to create a data stream failure store (#99134) 2023-11-15 15:32:51 -05:00