Skip to content
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

Remove aggregation's postCollect phase (#64016) #64317

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Oct 28, 2020

After #63811 it became clear to me that postCollect is kind of
dangerous and not all that useful. So this removes it.

The trouble with postCollect is that it all happened right after we
finished calling collect on the LeafBucketCollectors but before we
built the aggregation results. But in #63811 we found out that we can't
call postCollect on the children of parent or child aggregators
until we know which which aggregation results we're building.

So this removes postCollect and moves all of the things we did at
post-collect phase into buildAggregations or into hooks called in
those methods.

After elastic#63811 it became clear to me that `postCollect` is kind of
dangerous and not all that useful. So this removes it.

The trouble with `postCollect` is that it all happened right after we
finished calling `collect` on the `LeafBucketCollectors` but before we
built the aggregation results. But in elastic#63811 we found out that we can't
call `postCollect` on the children of `parent` or `child` aggregators
until we know which *which* aggregation results we're building.

So this removes `postCollect` and moves all of the things we did at
post-collect phase into `buildAggregations` or into hooks called in
those methods.
@nik9000 nik9000 merged commit be7021f into elastic:7.x Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant