-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account for TransportMultiSearchAction's response array in Circuit Breaker #32051
Comments
Pinging @elastic/es-core-infra |
Pinging @elastic/es-search-aggs |
It's not just multi-search, even one (sizable) search request (i.e. via |
While this issue involves circuit breakers, it is in fact just about a particular use of circuit breakers, but not the circuit breaker infrastructure. So I am removing the core/infra label and leaving to to the search team to implement/manage as they see fit. |
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
This issue has been opened for a very long time, we haven't followed up on addressing it and we don't have plans on doing so for the time being. There has also been focus on memory management and circuit breaking in case of memory pressure, in the context of each search request. |
TransportMultiSearchAction
has anAtomicArray
that is used to collect individual search responses as they finish executing. When the last request finishes, the results in the array are packaged into aMultiSearchResponse
and sent back to the client.If the multi-search involves a large number of shards, or the responses are very large, or there are many multi-searches in parallel (or all three)... this seems like a prime candidate for causing an OOM on smaller heaps.
I don't believe we track this array in any circuit breaker explicitly, and since it is holding finished results it isn't subject to any breakers in place for the search phase. If the responses come back to the coordinating node in a staggered manner it is unlikely to trip the in-flight breaker either.
It would be nice if we could account for this array in the Request breaker somehow. I imagine the tricky bit is estimating how big the various
SearchResponse
are (orException
in the case of failures). @dakrone suggested maybe selectingn
responses and averaging their size to use as a heuristic.Tagging both Core/CB and Search because I'm indecisive...sorry! :)
The text was updated successfully, but these errors were encountered: