mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
When fetching documents, sometimes we need to load the entire source of search hits. Document sources can be large, and with support for up to 10k hits per search request, this creates a significant untracked memory load on Elasticsearch that can potentially cause out-of-memory errors. This PR adds memory checking for hits source in the fetch phase. We check with the parent (the real memory) circuit breaker every 1MiB of loaded source and when fetching the last document of every segment. This gives the real memory breaker a chance to interrupt running operations when we're running low on memory, and prevent potential OOMs. The amount of local accounting to buffer is controlled by the `search.memory_accounting_buffer_size` dynamic setting and defaults to `1MiB`. Fixes #89656
6 lines
122 B
YAML
6 lines
122 B
YAML
pr: 121920
|
|
summary: Account for the `SearchHit` source in circuit breaker
|
|
area: Search
|
|
type: enhancement
|
|
issues:
|
|
- 89656
|