Skip to content
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

Add a soft limit for the number of buckets created by extended_bounds #27452

Closed
colings86 opened this issue Nov 20, 2017 · 1 comment
Closed
Assignees

Comments

@colings86
Copy link
Contributor

At the moment there are no safeguards against creating histogram and date_histogram requests that produce a huge number of buckets on the reduce node because the number of empty buckets required by extended bounds is extremely high (see #27447 for an example).

We should add a soft limit that ensures that the number of buckets required by the combination of the interval and the extended bounds does not cross a threshold and cause GCs/destabilise the cluster. I suggest we set this limit to 1,000.

@s1monw
Copy link
Contributor

s1monw commented Nov 20, 2017

Sounds good to me

@colings86 colings86 removed the discuss label Nov 24, 2017
jimczi added a commit that referenced this issue Dec 6, 2017
…ed by a request (#27581)

This commit adds a new dynamic cluster setting named `search.max_buckets` that can be used to limit the number of buckets created per shard or by the reduce phase. Each multi bucket aggregator can consume buckets during the final build of the aggregation at the shard level or during the reduce phase (final or not) in the coordinating node. When an aggregator consumes a bucket, a global count for the request is incremented and if this number is greater than the limit an exception is thrown (TooManyBuckets exception).
This change adds the ability for multi bucket aggregator to "consume" buckets in the global limit, the default is 10,000. It's an opt-in consumer so each multi-bucket aggregator must explicitly call the consumer when a bucket is added in the response.

Closes #27452 #26012
jimczi added a commit that referenced this issue Dec 11, 2017
…ed by a request (#27581)

This commit adds a new dynamic cluster setting named `search.max_buckets` that can be used to limit the number of buckets created per shard or by the reduce phase. Each multi bucket aggregator can consume buckets during the final build of the aggregation at the shard level or during the reduce phase (final or not) in the coordinating node. When an aggregator consumes a bucket, a global count for the request is incremented and if this number is greater than the limit an exception is thrown (TooManyBuckets exception).
This change adds the ability for multi bucket aggregator to "consume" buckets in the global limit, the default is 10,000. It's an opt-in consumer so each multi-bucket aggregator must explicitly call the consumer when a bucket is added in the response.

Closes #27452 #26012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants