-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Reduce InternalHistogram and InternalDateHistogram in a streaming fashion #105359
Reduce InternalHistogram and InternalDateHistogram in a streaming fashion #105359
Conversation
Pinging @elastic/es-analytical-engine (Team:Analytics) |
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.
I think it's good. These are also fairly uncontroversial to me because the merge operation is just hashing.
...asticsearch/search/aggregations/bucket/histogram/HistogramMultiBucketsAggregatorReducer.java
Outdated
Show resolved
Hide resolved
...asticsearch/search/aggregations/bucket/histogram/HistogramMultiBucketsAggregatorReducer.java
Outdated
Show resolved
Hide resolved
...asticsearch/search/aggregations/bucket/histogram/HistogramMultiBucketsAggregatorReducer.java
Outdated
Show resolved
Hide resolved
Also! I think it'd be good to wait until next week to merge this so we can get a couple of overnight runs with the last few changes. |
Similarly to #105348 InternalHistogram and InternalDateHistogram can be wasteful and can be reduced in a streaming fashion. In this case we introduce a HistogramMultiBucketsAggregatorReducer to do the job.
This change might be more controversial because we change from collecting buckets on a priority queue to use a
LongObjectPagedHashMap
to keep track of the reduced buckets. I feel this approach will be faster but I lack of feeling of the performance profile ofLongObjectPagedHashMap
.relates #105207