Skip to content

Reuse bucket when reduce terms buckets#20483

Draft
bowenlan-amzn wants to merge 1 commit intoopensearch-project:mainfrom
bowenlan-amzn:reuse-bucket
Draft

Reuse bucket when reduce terms buckets#20483
bowenlan-amzn wants to merge 1 commit intoopensearch-project:mainfrom
bowenlan-amzn:reuse-bucket

Conversation

@bowenlan-amzn
Copy link
Copy Markdown
Member

@bowenlan-amzn bowenlan-amzn commented Jan 26, 2026

Description

When the requested field's cardinality is high, the reduce of term aggregation bucket creation become heavy.
Every cardinality is represented by a bucket. For each reduce, we merge the bucket of same key from multiple responses together, and create a new bucket for that.

This PR tries to reuse the existing bucket from the 1st response by in-place updating the field values, instead of creating one.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 26, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for ae8b2ac: 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?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for ef07406: 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?

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for be081cb: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.36%. Comparing base (672039d) to head (be081cb).
⚠️ Report is 93 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20483      +/-   ##
============================================
+ Coverage     73.25%   73.36%   +0.11%     
- Complexity    71979    72053      +74     
============================================
  Files          5796     5796              
  Lines        329287   329293       +6     
  Branches      47419    47420       +1     
============================================
+ Hits         241203   241575     +372     
+ Misses        68759    68401     -358     
+ Partials      19325    19317       -8     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added stalled Issues that have stalled and removed stalled Issues that have stalled labels Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant