Skip to content

Conversation

@kaushalmahi12
Copy link
Contributor

Description

This change is to address the bug when search backpressure service is gathering the node stats and there are QueryGroupTasks in the system which doesn't have the queryGroupId set. In this case there will be a NPE thrown for node stats due to this line.

But this will only happen for 2.x versions since they don't have the scroll API changes for setting the queryGroupId #17169. We had to remove the API change because of the backward compatibility failure which was blocking the merge but later maintainers removed the check for internalApi annotated classes since they are not meant to be used outside of opensearch core.

I will also add that change in 2.x subsequently.

Related Issues

Resolves #17518 (comment)

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
Contributor

❌ Gradle check result for 3dcb827: 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
Contributor

❌ Gradle check result for 3dcb827: 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
Contributor

❌ Gradle check result for b165076: 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: Kaushal Kumar <[email protected]>
@github-actions
Copy link
Contributor

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

@jainankitk
Copy link
Contributor

Looks unrelated:

[Test Result](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/) (20 failures / +20)

    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testSnapshotAndRestore](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/testSnapshotAndRestore/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_2/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testSnapshotAndRestore](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/testSnapshotAndRestore_2/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_3/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_4/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_5/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_6/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testSnapshotAndRestore](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/testSnapshotAndRestore_3/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_7/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_8/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testSnapshotAndRestore](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/testSnapshotAndRestore_4/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_9/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_10/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_11/)
    [org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.classMethod](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.repositories.s3/S3BlobStoreRepositoryTests/classMethod_12/)
    [org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.snapshots/DedicatedClusterSnapshotRestoreIT/testSnapshotWithStuckNode/)
    [org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.snapshots/DedicatedClusterSnapshotRestoreIT/testSnapshotWithStuckNode_2/)
    [org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.snapshots/DedicatedClusterSnapshotRestoreIT/testSnapshotWithStuckNode_3/)
    [org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode](https://build.ci.opensearch.org/job/gradle-check/54544/testReport/junit/org.opensearch.snapshots/DedicatedClusterSnapshotRestoreIT/testSnapshotWithStuckNode_4/)

@jainankitk
Copy link
Contributor

Retrying gradle check

@github-actions
Copy link
Contributor

✅ Gradle check result for fb34b94: SUCCESS

@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.44%. Comparing base (2ee8660) to head (fb34b94).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...ain/java/org/opensearch/wlm/QueryGroupService.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17576      +/-   ##
============================================
+ Coverage     72.43%   72.44%   +0.01%     
- Complexity    65694    65718      +24     
============================================
  Files          5311     5311              
  Lines        304937   304934       -3     
  Branches      44226    44225       -1     
============================================
+ Hits         220872   220918      +46     
+ Misses        65912    65907       -5     
+ Partials      18153    18109      -44     

☔ 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 8ee5eeb into opensearch-project:main Mar 14, 2025
30 of 31 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 14, 2025
* add validation check for SBP service

Signed-off-by: Kaushal Kumar <[email protected]>

* add SBP should not handle the task tracking UT

Signed-off-by: Kaushal Kumar <[email protected]>

* add CHANGELOG entry

Signed-off-by: Kaushal Kumar <[email protected]>

* fix broken UT

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments

Signed-off-by: Kaushal Kumar <[email protected]>

---------

Signed-off-by: Kaushal Kumar <[email protected]>
(cherry picked from commit 8ee5eeb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.19 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.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.19
# Create a new branch
git switch --create backport/backport-17576-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8ee5eebc3728a19487c0604d9828f92770fcd7ec
# Push it to GitHub
git push --set-upstream origin backport/backport-17576-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.19

Then, create a pull request where the base branch is 2.19 and the compare/head branch is backport/backport-17576-to-2.19.

jainankitk pushed a commit that referenced this pull request Mar 17, 2025
…17591)

* add validation check for SBP service



* add SBP should not handle the task tracking UT



* add CHANGELOG entry



* fix broken UT



* address comments



---------


(cherry picked from commit 8ee5eeb)

Signed-off-by: Kaushal Kumar <[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>
kaushalmahi12 added a commit to kaushalmahi12/OpenSearch that referenced this pull request Mar 17, 2025
…ch-project#17576)

* add validation check for SBP service

Signed-off-by: Kaushal Kumar <[email protected]>

* add SBP should not handle the task tracking UT

Signed-off-by: Kaushal Kumar <[email protected]>

* add CHANGELOG entry

Signed-off-by: Kaushal Kumar <[email protected]>

* fix broken UT

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments

Signed-off-by: Kaushal Kumar <[email protected]>

---------

Signed-off-by: Kaushal Kumar <[email protected]>
jainankitk pushed a commit that referenced this pull request Mar 18, 2025
…17613)

* add validation check for SBP service



* add SBP should not handle the task tracking UT



* add CHANGELOG entry



* fix broken UT



* address comments



---------

Signed-off-by: Kaushal Kumar <[email protected]>
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Mar 18, 2025
…ch-project#17576)

* add validation check for SBP service

Signed-off-by: Kaushal Kumar <[email protected]>

* add SBP should not handle the task tracking UT

Signed-off-by: Kaushal Kumar <[email protected]>

* add CHANGELOG entry

Signed-off-by: Kaushal Kumar <[email protected]>

* fix broken UT

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments

Signed-off-by: Kaushal Kumar <[email protected]>

---------

Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Vinay Krishna Pudyodu <[email protected]>
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 2.19 backport-failed bug Something isn't working Search Search query, autocomplete ...etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

null_pointer_exception - Cannot invoke "String.equals(Object)" because the return value of "org.opensearch.wlm.QueryGroupTask.getQueryGroupId()" is null

2 participants