Skip to content

Remove MultiCollectorWrapper and use MultiCollector in Lucene instead#19595

Merged
gaobinlong merged 6 commits intoopensearch-project:mainfrom
gaobinlong:multiCollector
Oct 14, 2025
Merged

Remove MultiCollectorWrapper and use MultiCollector in Lucene instead#19595
gaobinlong merged 6 commits intoopensearch-project:mainfrom
gaobinlong:multiCollector

Conversation

@gaobinlong
Copy link
Copy Markdown
Contributor

@gaobinlong gaobinlong commented Oct 10, 2025

Description

As this comment said, once MultiCollector.getCollectors() method in Lucene is declared as public, we can use that method directly rather than creating a new similar class, this PR replaces MultiCollectorWrapper with MultiCollector in Lucene, and removes MultiCollectorWrapper as it was internally used and won't be used anymore.

Related Issues

No issue.

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.

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for db44cf9: 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 db44cf9: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.12%. Comparing base (2695c93) to head (24d6195).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...ensearch/search/query/TopDocsCollectorContext.java 72.22% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19595      +/-   ##
============================================
+ Coverage     73.06%   73.12%   +0.05%     
+ Complexity    70630    70604      -26     
============================================
  Files          5723     5722       -1     
  Lines        323513   323503      -10     
  Branches      46852    46851       -1     
============================================
+ Hits         236384   236556     +172     
+ Misses        68013    67879     -134     
+ Partials      19116    19068      -48     

☔ 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.

@github-actions
Copy link
Copy Markdown
Contributor

❕ Gradle check result for 6fd02e5: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Copy Markdown
Member

@sandeshkr419 sandeshkr419 left a comment

Choose a reason for hiding this comment

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

LGTM, just a minor code refactoring near the lines of code you are touching upon!

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for 7509360: SUCCESS

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for 24d6195: SUCCESS

@gaobinlong gaobinlong merged commit 65cd2c8 into opensearch-project:main Oct 14, 2025
32 of 33 checks passed
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Oct 15, 2025
…opensearch-project#19595)

* Remove MultiCollectorWrapper and use MultiCollector in Lucene instead

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Modify change log

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Optimize some code

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* pattern matching for instanceof

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Remove redundant bracket

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

---------

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Oct 18, 2025
…opensearch-project#19595)

* Remove MultiCollectorWrapper and use MultiCollector in Lucene instead

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Modify change log

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Optimize some code

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* pattern matching for instanceof

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Remove redundant bracket

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

---------

Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants