-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Fix IndexOutOfBoundsException in histograms for NaN doubles (#26787) #26856
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
Fix IndexOutOfBoundsException in histograms for NaN doubles (#26787) #26856
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. Let me make it run through CI.
@elasticmachine please test it |
* ccr: (42 commits) [DOCS] Added info about snapshotting your data before an upgrade. Add documentation about disabling `_field_names`. (elastic#26813) Remove UnsortedNumericDoubleValues (elastic#26817) Fix IndexOutOfBoundsException in histograms for NaN doubles (elastic#26787) (elastic#26856) [TEST] Added skipping the `headers` feature to the Bulk REST YAML test Update type-field.asciidoc Fix search_after with geo distance sorting (elastic#26891) Use proper logging placeholder for Netty logging Add Netty channel information on write and flush failure Remove deploying in JBoss documentation Document JVM option MaxFDLimit for macOS () Add additional low-level logging handler () Unwrap causes when maybe dying Change log level on write and flush failure to warn [TEST] add test to ensure legacy list syntax in yml works fine Bump BWC version for settings serialization to 6.1.0 Removed void token filter entries and added two tests Added Bengali Analyzer to Elasticsearch with respect to the lucene update(PR#238) Fix toString() in SnapshotStatus (elastic#26852) elastic#26870 change bwc version for fuzzy_transpositions to 6.1 after backport ...
* ccr: (110 commits) Use LF line endings in Painless generated files (elastic#26822) [DOCS] Added info about snapshotting your data before an upgrade. Add documentation about disabling `_field_names`. (elastic#26813) Remove UnsortedNumericDoubleValues (elastic#26817) Fix IndexOutOfBoundsException in histograms for NaN doubles (elastic#26787) (elastic#26856) [TEST] Added skipping the `headers` feature to the Bulk REST YAML test Update type-field.asciidoc Fix search_after with geo distance sorting (elastic#26891) Use proper logging placeholder for Netty logging Add Netty channel information on write and flush failure Remove deploying in JBoss documentation Document JVM option MaxFDLimit for macOS () Add additional low-level logging handler () Unwrap causes when maybe dying Change log level on write and flush failure to warn [TEST] add test to ensure legacy list syntax in yml works fine Bump BWC version for settings serialization to 6.1.0 Removed void token filter entries and added two tests Added Bengali Analyzer to Elasticsearch with respect to the lucene update(PR#238) Fix toString() in SnapshotStatus (elastic#26852) ...
In this test we were randomizing different values but minDocCount was hardcoded to 1. It's important to test other values, especially `0` as it's the default. The test needed some adapting in the way buckets are randomly generated: all aggs need to share the same interval, minDocCount and emptyBucketInfo. Also assertions need to take into account that more (or less) buckets are expected depending on minDocCount. This was originated by elastic#35921 and its need to test adding empty buckets as part of the reduce phase. Also relates to elastic#26856 as one more key comparison needed to use `Double.compare` to properly handle `NaN` values, this was triggered by the increased test coverage.
In `InternalHistogramTests` we were randomizing different values but `minDocCount` was hardcoded to `1`. It's important to test other values, especially `0` as it's the default. To make this possible, the test needed some adapting in the way buckets are randomly generated: all aggs need to share the same `interval`, `minDocCount` and `emptyBucketInfo`. Also assertions need to take into account that more (or less) buckets are expected depending on `minDocCount`. This was originated by #35921 and its need to test adding empty buckets as part of the reduce phase. Also relates to #26856 as one more key comparison needed to use `Double.compare` to properly handle `NaN` values, which was triggered by the increased test coverage.
In `InternalHistogramTests` we were randomizing different values but `minDocCount` was hardcoded to `1`. It's important to test other values, especially `0` as it's the default. To make this possible, the test needed some adapting in the way buckets are randomly generated: all aggs need to share the same `interval`, `minDocCount` and `emptyBucketInfo`. Also assertions need to take into account that more (or less) buckets are expected depending on `minDocCount`. This was originated by #35921 and its need to test adding empty buckets as part of the reduce phase. Also relates to #26856 as one more key comparison needed to use `Double.compare` to properly handle `NaN` values, which was triggered by the increased test coverage.
The linked issue should contain all information necessary to review.
There might be better ways to test this change, my experience with the Elasticsearch test design is limited.
I also have a working patch against the 5.6 branch, which I care about more at this point (having the fix in a future 5.x release). Let me know if you'd like me to submit that one separately.
Thanks!