-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Save memory in on aggs in async search #55083
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
Conversation
This replaces a reference to the result of partially reducing aggregations that async search keeps with a reference to the serialized form of the result of the partial reduction which we need to keep anyway.
|
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
|
I've marked this a blocker for 7.8.0 because we'd really like to avoid releasing with the aggs referenced twice in async search. We have plenty of time to get it or something like it merged. |
|
Follow up to #54758 (review) |
|
Test failures are real. Looks like I should have run more of the tests before opening! |
|
I could have made aggs from remote clusters delayed but that'd have effected the transport client and, maybe, other things. I'll investigate it, but I don't want to "sneak" that in. |
jimczi
left a comment
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.
The change makes sense to me. I left one comment regarding the usage of InternalSearchResponse#aggregations that should be addressed.
| if (aggregations == null) { | ||
| throw new IllegalStateException("aggregations already consumed"); | ||
| } | ||
| return aggregations.get(); |
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 am worried about the hidden cost of calling this on serialized aggs. Can we at least ensure that we don't get aggregations twice like here ?
|
I took another look at this one with a week's distance and I hate it. I'm going to give it another shot in another way. This morning I'll be experimenting with async search locally to see how it all works..... |
|
Replaced by #55683. |
This replaces a reference to the result of partially reducing
aggregations that async search keeps with a reference to the serialized
form of the result of the partial reduction which we need to keep
anyway.