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

Fix double invocation of postCollection when MultiBucketCollector is present #14015

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

jed326
Copy link
Collaborator

@jed326 jed326 commented Jun 6, 2024

Description

Fixes a bug where postCollection would be called twice when a MultiBucketCollector is present. This was resulting in double counting the docs in the last segment for deferred bucket collectors.

Related Issues

Resolves #14000

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…present

Signed-off-by: Jay Deng <jayd0104@gmail.com>
@jed326 jed326 added the backport 2.x Backport to 2.x branch label Jun 6, 2024
Copy link
Contributor

github-actions bot commented Jun 6, 2024

❌ Gradle check result for 2d9e52d: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@jed326
Copy link
Collaborator Author

jed326 commented Jun 6, 2024

@sohami @reta @dennisoelkers could you please take a look?

Thanks!

Copy link
Contributor

github-actions bot commented Jun 6, 2024

❌ Gradle check result for 9b2ebbd: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Jun 6, 2024

✅ Gradle check result for 9b2ebbd: SUCCESS

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.56%. Comparing base (b15cb0c) to head (9b2ebbd).
Report is 351 commits behind head on main.

Files Patch % Lines
...egations/bucket/BestBucketsDeferringCollector.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14015      +/-   ##
============================================
+ Coverage     71.42%   71.56%   +0.13%     
- Complexity    59978    61344    +1366     
============================================
  Files          4985     5066      +81     
  Lines        282275   288263    +5988     
  Branches      40946    41754     +808     
============================================
+ Hits         201603   206281    +4678     
- Misses        63999    64963     +964     
- Partials      16673    17019     +346     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dennisoelkers
Copy link

@jed326: Tested it locally and it fixes the problem. Great work! Many thanks for the quick investigation and fix, as well as providing a workaround for 2.14!

Copy link

@dennisoelkers dennisoelkers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the problem described in #14000.

@reta
Copy link
Collaborator

reta commented Jun 6, 2024

Thank you @jed326 !

@jed326 jed326 merged commit 1cded65 into opensearch-project:main Jun 6, 2024
35 of 39 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 6, 2024
…present (#14015)

Signed-off-by: Jay Deng <jayd0104@gmail.com>
(cherry picked from commit 1cded65)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jed326 pushed a commit that referenced this pull request Jun 6, 2024
…present (#14015)

Signed-off-by: Jay Deng <jayd0104@gmail.com>
(cherry picked from commit 1cded65)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jed326 pushed a commit that referenced this pull request Jun 7, 2024
…present (#14015)

Signed-off-by: Jay Deng <jayd0104@gmail.com>
(cherry picked from commit 1cded65)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Jun 7, 2024
…present (#14015) (#14048)

(cherry picked from commit 1cded65)

Signed-off-by: Jay Deng <jayd0104@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
parv0201 pushed a commit to parv0201/OpenSearch that referenced this pull request Jun 10, 2024
kkewwei pushed a commit to kkewwei/OpenSearch that referenced this pull request Jul 24, 2024
…present (opensearch-project#14015) (opensearch-project#14048)

(cherry picked from commit 1cded65)

Signed-off-by: Jay Deng <jayd0104@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: kkewwei <kkewwei@163.com>
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch bug Something isn't working Search:Aggregations v2.15.0 Issues and PRs related to version 2.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Additional aggregation in search request is changing results
4 participants