-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Only execute one final reduction in InternalAutoDateHistogram #45359
Only execute one final reduction in InternalAutoDateHistogram #45359
Conversation
Because auto-date-histo can perform multiple reductions while merging buckets, we need to ensure that the intermediate reductions are done with a `finalReduce` set to false to prevent Pipeline aggs from generating their output. Once all the buckets have been merged and the output is stable, a mostly-noop reduction can be performed which will allow pipelines to generate their output.
Pinging @elastic/es-analytics-geo |
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.
one small comment but the rest of it LGTM
...n/java/org/elasticsearch/search/aggregations/bucket/histogram/InternalAutoDateHistogram.java
Outdated
Show resolved
Hide resolved
@elasticmachine update branch |
Because auto-date-histo can perform multiple reductions while merging buckets, we need to ensure that the intermediate reductions are done with a `finalReduce` set to false to prevent Pipeline aggs from generating their output. Once all the buckets have been merged and the output is stable, a mostly-noop reduction can be performed which will allow pipelines to generate their output.
I reverted this commit because Unsure of the cause, but it was starting to look like it's not just a test bug but an actual problem with the PR. Will revisit and open a new PR. |
Because auto-date-histo can perform multiple reductions while merging buckets, we need to ensure that the intermediate reductions are done with a
finalReduce
set to false to prevent Pipeline aggs from generating their output.This is done by creating a "fake" non-final reduce context for the intermediate merging. Once all the buckets have been merged and the output is stable, a mostly-noop final reduction can be performed which will allow pipelines to generate their output.
Closes #44914