Currently the global_ordinals mode is picked automatically for any root aggregation on a keyword field. This works well in a lot of cases except when a child aggregation expects dense buckets:
#24359
This issue is mostly visible with memory intensive aggregations like cardinality because currently they can go OOM even when the number of documents matching the query is low. Though it has also an impact on less memory intensive aggregation like max which also expects dense buckets.
This issue is a placeholder to list the actions that we are going to make to fix this situation:
Currently the
global_ordinalsmode is picked automatically for any root aggregation on a keyword field. This works well in a lot of cases except when a child aggregation expects dense buckets:#24359
This issue is mostly visible with memory intensive aggregations like
cardinalitybecause currently they can go OOM even when the number of documents matching the query is low. Though it has also an impact on less memory intensive aggregation likemaxwhich also expects dense buckets.This issue is a placeholder to list the actions that we are going to make to fix this situation:
Automatically set execution_hint to
global_ordinals_hashif a child agg is present (Terms aggregation should remap global ordinal buckets when a sub-aggregator is used to sort the terms #24941)Evaluate the impact in terms of performance
Circuit breaker should properly detect memory explosion in big arrays to prevent OOM (BigArrays should call the circuit breaker before allocating the arrays #24790)