Skip to content

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

Merged
nik9000 merged 1 commit intoelastic:7.xfrom
nik9000:aggregration_drop_post_collect_7_x
Oct 29, 2020
Merged

Remove aggregation's postCollect phase (#64016)#64317
nik9000 merged 1 commit intoelastic:7.xfrom
nik9000:aggregration_drop_post_collect_7_x

Conversation

@nik9000
Copy link
Copy Markdown
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