Use global_ordinals_hash execution mode when sorting by sub aggregations.#26014
Conversation
…tions. This is a safer default since sorting by sub aggregations prevents these aggregations from being deferred. `global_ordinals_hash` will at least make sure that we do not use memory for buckets that are not collected. Closes elastic#24359
|
Could this be back-ported to the 6.0 branch? Although this is labelled as an enhancement I think it will help to prevent OOMEs during the collect phases of aggregations especially when sorting by the cardinality agg which seems to be relatively popular. |
|
Agreed, I'll backport! |
|
Done. |
|
Sorry I missed this pr, a broader protection has been added with |
|
I think that makes sense. We'd need to apply the other heuristics that we have in the factory such as whether there is a parent bucket aggregation. But then I'm a bit annoyed by the fact that we'd be making most decisions at the Aggregator level while it really belongs to the factory. Not sure, maybe you have opinions/ideas around that? |
|
I opened #26173 which deprecates |
* master: (30 commits) Rewrite range queries with open bounds to exists query (elastic#26160) Fix eclipse compilation problem (elastic#26170) Epoch millis and second formats parse float implicitly (Closes elastic#14641) (elastic#26119) fix SplitProcessor targetField test (elastic#26178) Fixed typo in README.textile (elastic#26168) Fix incorrect class name in deleteByQuery docs (elastic#26151) Move more token filters to analysis-common module reindex: automatically choose the number of slices (elastic#26030) Fix serialization of the `_all` field. (elastic#26143) percolator: Hint what clauses are important in a conjunction query based on fields Remove unused Netty-related settings (elastic#26161) Remove SimpleQueryStringIT#testPhraseQueryOnFieldWithNoPositions. Tests: reenable ShardReduceIT#testIpRange. Allow `ClusterState.Custom` to be created on initial cluster states (elastic#26144) Teach the build about betas and rcs (elastic#26066) Fix wrong header level inner hits: Unfiltered nested source should keep its full path Document how to import Lucene Snapshot libs when elasticsearch clients (elastic#26113) Use `global_ordinals_hash` execution mode when sorting by sub aggregations. (elastic#26014) Make the README use a single type in examples. (elastic#26098) ...
This is a safer default since sorting by sub aggregations prevents these
aggregations from being deferred.
global_ordinals_hashwill at leastmake sure that we do not use memory for buckets that are not collected.
Closes #24359