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

Stop processing search requests when _msearch is canceled #17005

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

msfroh
Copy link
Collaborator

@msfroh msfroh commented Jan 11, 2025

Description

Prior to this fix, the _msearch API would keep running search requests even after being canceled. With this change, we explicitly check if the task has been canceled before kicking off subsequent requests.

Related Issues

Resolves #17004

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.

Copy link
Contributor

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

❕ Gradle check result for 30d127a: 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

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 72.34%. Comparing base (931c1aa) to head (2cd0983).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...arch/action/search/TransportMultiSearchAction.java 70.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17005      +/-   ##
============================================
+ Coverage     72.30%   72.34%   +0.03%     
+ Complexity    65482    65469      -13     
============================================
  Files          5309     5309              
  Lines        304324   304347      +23     
  Branches      44132    44141       +9     
============================================
+ Hits         220056   220187     +131     
+ Misses        66259    66104     -155     
- Partials      18009    18056      +47     

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

@reta reta added the backport 2.x Backport to 2.x branch label Jan 11, 2025
@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 v2.19.0 Issues and PRs related to version 2.19.0 labels Jan 11, 2025
Copy link
Contributor

✅ Gradle check result for ff03507: SUCCESS

Copy link
Contributor

❌ Gradle check result for 48bf890: null

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

❌ Gradle check result for 48bf890: 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

❌ Gradle check result for 44b2bb6: 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

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

@msfroh msfroh requested a review from cwperks as a code owner January 23, 2025 21:38
Copy link
Contributor

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

Prior to this fix, the _msearch API would keep running search requests
even after being canceled. With this change, we explicitly check if
the task has been canceled before kicking off subsequent requests.

Signed-off-by: Michael Froh <[email protected]>
I tried cancelling a request and found that the client would hang.
This change reports an exception for each remaining request instead.

Signed-off-by: Michael Froh <[email protected]>
Signed-off-by: Michael Froh <[email protected]>
Copy link
Contributor

✅ Gradle check result for 2cd0983: SUCCESS

@msfroh msfroh merged commit 77e91c2 into opensearch-project:main Jan 24, 2025
29 of 30 checks passed
@msfroh msfroh deleted the cancel_msearch branch January 24, 2025 23:25
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 24, 2025
Prior to this fix, the _msearch API would keep running search requests
even after being canceled. With this change, we explicitly check if
the task has been canceled before kicking off subsequent requests.

---------

Signed-off-by: Michael Froh <[email protected]>
(cherry picked from commit 77e91c2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
prudhvigodithi pushed a commit to prudhvigodithi/OpenSearch that referenced this pull request Jan 25, 2025
…-project#17005)

Prior to this fix, the _msearch API would keep running search requests
even after being canceled. With this change, we explicitly check if
the task has been canceled before kicking off subsequent requests.

---------

Signed-off-by: Michael Froh <[email protected]>
prudhvigodithi pushed a commit to prudhvigodithi/OpenSearch that referenced this pull request Jan 25, 2025
…-project#17005)

Prior to this fix, the _msearch API would keep running search requests
even after being canceled. With this change, we explicitly check if
the task has been canceled before kicking off subsequent requests.

---------

Signed-off-by: Michael Froh <[email protected]>
reta pushed a commit that referenced this pull request Jan 25, 2025
…17119)

Prior to this fix, the _msearch API would keep running search requests
even after being canceled. With this change, we explicitly check if
the task has been canceled before kicking off subsequent requests.

---------


(cherry picked from commit 77e91c2)

Signed-off-by: Michael Froh <[email protected]>
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>
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:Resiliency v2.19.0 Issues and PRs related to version 2.19.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] _msearch API doesn't properly handle task cancellation
2 participants