Skip to content

Conversation

@nik9000
Copy link
Member

@nik9000 nik9000 commented Feb 5, 2020

When the rare_terms aggregation contained another aggregation it'd
break them. Most of the time. This happened because the process that it
uses to remove buckets that turn out not to be rare was incorrectly
merging results from multiple leaves. This'd cause array index out of
bounds issues. We didn't catch it in the test because the issue doesn't
happen on the very first bucket. And the tests generated data in such a
way that the first bucket always contained the rare terms. Randomizing
the order of the generated data fixed the test so it caught the issue.

Closes #51020

When the `rare_terms` aggregation contained another aggregation it'd
break them. Most of the time. This happened because the process that it
uses to remove buckets that turn out not to be rare was incorrectly
merging results from multiple leaves. This'd cause array index out of
bounds issues. We didn't catch it in the test because the issue doesn't
happen on the very first bucket. And the tests generated data in such a
way that the first bucket always contained the rare terms. Randomizing
the order of the generated data fixed the test so it caught the issue.

Closes elastic#51020
@nik9000 nik9000 changed the title Fix a sneaky bug in rare_terms (#51868) Fix a sneaky bug in rare_terms (backport of #51868) Feb 5, 2020
@nik9000
Copy link
Member Author

nik9000 commented Feb 11, 2020

@elasticmachine, run elasticsearch-ci/2

@nik9000 nik9000 merged commit 8b075da into elastic:7.6 Feb 12, 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