-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BUG] A sufficiently small interval value on a histogram can crash the node #14558
Comments
Did some work on this today. OpenSearch/server/src/main/java/org/opensearch/search/aggregations/bucket/BucketsAggregator.java Lines 123 to 128 in 501a702
So before the reduce phase, what we can do best is to fail gracefully before OOM. Above is a snippet to do that. |
@bowenlan-amzn , hi, terribly sorry for the delay, wanted to thank you for looking into this and providing a fix 🙇 |
Describe the bug
Provided you have a
long
field on your index, with extreme min and max values for it, when attempting to return a histogram aggregation on that field using a small interval value, the node instance crashes with OOM.Related component
Search:Aggregations
To Reproduce
Use the default docker-compose provided on the OS site (it's using
:latest
, which at the time of writing is2.15.0
)Add 2 documents
interval
1000
100
curl: (56) OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
, becauseopensearch-node1
just died:Expected behavior
i would have expected (liked, if possible) to get the same
too_many_buckets_exception
Additional Details
Plugins
n/a
Screenshots
n/a
Host/Environment (please complete the following information):
Additional context
Workarounds
"min_doc_count": 1
prevents the crash (and it returns 2 buckets,key: 0
andkey: 1234567800
); this expects that the clients will have to reconstruct the rest of the empty buckets themselves (not always possible for my particular case, sadly)512m
to1024m
, for example, prevents the crash for"interval": 100"
, but it crashes for"interval": 10"
The text was updated successfully, but these errors were encountered: