Skip to content

Add tracking for long running SearchTask post cancellation#17726

Merged
jainankitk merged 2 commits intoopensearch-project:mainfrom
ruai0511:coordinatortask-PR
Apr 5, 2025
Merged

Add tracking for long running SearchTask post cancellation#17726
jainankitk merged 2 commits intoopensearch-project:mainfrom
ruai0511:coordinatortask-PR

Conversation

@ruai0511
Copy link
Copy Markdown
Contributor

Description

This PR addes tracking logic for SearchTask to monitor rogue queries at the coordinator level. Previously, the service only tracked SearchShardTask (queries at the shard level) that were cancelled but continued running.

Related Issues

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

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.

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for ea4d4da:

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?

@ruai0511 ruai0511 force-pushed the coordinatortask-PR branch from ea4d4da to c940580 Compare April 1, 2025 01:45
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2025

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

ruai0511 added 2 commits April 4, 2025 12:36
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
@ruai0511 ruai0511 force-pushed the coordinatortask-PR branch from c940580 to 5d0ecd3 Compare April 4, 2025 19:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2025

✅ Gradle check result for 5d0ecd3: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 74.41860% with 11 lines in your changes missing coverage. Please review.

Project coverage is 72.32%. Comparing base (5f1b4ab) to head (5d0ecd3).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...va/org/opensearch/tasks/TaskCancellationStats.java 50.00% 2 Missing and 4 partials ⚠️
...nsearch/tasks/BaseSearchTaskCancellationStats.java 77.27% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #17726   +/-   ##
=========================================
  Coverage     72.32%   72.32%           
+ Complexity    66005    65969   -36     
=========================================
  Files          5356     5360    +4     
  Lines        306446   306504   +58     
  Branches      44395    44405   +10     
=========================================
+ Hits         221634   221685   +51     
- Misses        66660    66671   +11     
+ Partials      18152    18148    -4     

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

@jainankitk jainankitk merged commit e9d8e00 into opensearch-project:main Apr 5, 2025
31 checks passed
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-17726-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e9d8e0007b58f96a89b1a400a14eb2ed9f7aa597
# Push it to GitHub
git push --set-upstream origin backport/backport-17726-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-17726-to-2.x.

ruai0511 added a commit to ruai0511/OpenSearch that referenced this pull request Apr 22, 2025
…h-project#17726)

Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>

* add tracking for long running SearchTask post cancellation
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>

* add version checks for searchTask
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
(cherry picked from commit e9d8e00)
@ruai0511 ruai0511 deleted the coordinatortask-PR branch July 9, 2025 23:26
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 backport-failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants