Skip to content

Conversation

@kaushalmahi12
Copy link
Contributor

Description

In the current shard level query phase result consumption logic we have incorrect handling of the result consumption callbacks.
The callbacks should always be executed irrespective of whether the error has occurred or not while processing shard level query results.

This change closes those incomplete callback loops by

  • Clearing the buffered partial reduce tasks when a failure occurs during partial reduce execution
  • Stopping the partial reduce if the task has be cancelled

Related Issues

Resolves #19094

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: Kaushal Kumar <ravi.kaushal97@gmail.com>
@kaushalmahi12 kaushalmahi12 requested a review from a team as a code owner September 3, 2025 20:47
@github-actions github-actions bot added >test-failure Test failure from CI, local build, etc. autocut flaky-test Random test failure that succeeds on second run Search Search query, autocomplete ...etc labels Sep 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2025

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

@kaushalmahi12
Copy link
Contributor Author

kaushalmahi12 commented Sep 3, 2025

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2025

✅ Gradle check result for 6207664: SUCCESS

@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.86%. Comparing base (e0aebd9) to head (6207664).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...search/action/search/QueryPhaseResultConsumer.java 18.18% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19231      +/-   ##
============================================
+ Coverage     72.81%   72.86%   +0.05%     
- Complexity    69631    69666      +35     
============================================
  Files          5658     5658              
  Lines        320087   320096       +9     
  Branches      46345    46347       +2     
============================================
+ Hits         233057   233230     +173     
+ Misses        68118    67985     -133     
+ Partials      18912    18881      -31     

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

Copy link
Contributor

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

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

Thanks @kaushalmahi12 for addressing this flaky test. LGTM!

@jainankitk jainankitk merged commit f95bcae into opensearch-project:main Sep 4, 2025
30 of 31 checks passed
@kaushalmahi12 kaushalmahi12 deleted the flaky-ut branch September 5, 2025 03:25
jainankitk pushed a commit to jainankitk/OpenSearch that referenced this pull request Sep 22, 2025
…arch-project#19231)

---------
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
jainankitk pushed a commit to jainankitk/OpenSearch that referenced this pull request Sep 22, 2025
…arch-project#19231)

---------
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Ankit Jain <jainankitk@apache.org>
jainankitk pushed a commit to jainankitk/OpenSearch that referenced this pull request Sep 22, 2025
…arch-project#19231)

---------
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Ankit Jain <jainankitk@apache.org>
asimmahmood1 pushed a commit to jainankitk/OpenSearch that referenced this pull request Sep 23, 2025
…arch-project#19231)

---------
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
pranikum pushed a commit to pranikum/OpenSearch that referenced this pull request Sep 23, 2025
…arch-project#19231)

---------
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Sep 26, 2025
…arch-project#19231)

---------
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
kaushalmahi12 added a commit to kaushalmahi12/OpenSearch that referenced this pull request Oct 27, 2025
…arch-project#19231)

---------
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autocut flaky-test Random test failure that succeeds on second run Search Search query, autocomplete ...etc >test-failure Test failure from CI, local build, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AUTOCUT] Gradle Check Flaky Test Report for SearchPhaseControllerTests

3 participants