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

[Backport 2.x] Bug/sbp cancellation #14502

Merged

Conversation

kaushalmahi12
Copy link
Contributor

@kaushalmahi12 kaushalmahi12 commented Jun 21, 2024

Description

Backport bcccedb from #13474.

github-actions bot and others added 3 commits June 21, 2024 16:08
* change cancellation logic to fix disparity bw trackers and resource duress

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

* add additional tests for searchBackpressureService and refactor code

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

* add enumMap instead of list for tracking taskResourceUsageTrackets

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

* add nodeNotInDuress test for nodeDuressTrackers class

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

* address comments

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

* add entry in CHANGELOG

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

* address comments

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

* address comments

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

* remove wildcard import

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

* streamline imports

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

* address comments

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

* add additional test case to test the circuit breaker for SBP logic

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

* add missing javadoc to resourece type enum

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

* add javadoc to a method

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

* fix javadoc warnings

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

* fix javadoc warnings

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

---------

Signed-off-by: Kaushal Kumar <[email protected]>
(cherry picked from commit bcccedb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* change cancellation logic to fix disparity bw trackers and resource duress

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

* add additional tests for searchBackpressureService and refactor code

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

* add enumMap instead of list for tracking taskResourceUsageTrackets

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

* add nodeNotInDuress test for nodeDuressTrackers class

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

* address comments

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

* add entry in CHANGELOG

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

* address comments

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

* address comments

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

* remove wildcard import

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

* streamline imports

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

* address comments

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

* add additional test case to test the circuit breaker for SBP logic

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

* add missing javadoc to resourece type enum

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

* add javadoc to a method

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

* fix javadoc warnings

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

* fix javadoc warnings

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

---------

Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
@kaushalmahi12 kaushalmahi12 changed the base branch from backport/backport-13474-to-2.x to 2.x June 21, 2024 21:11
Copy link
Contributor

❌ Gradle check result for dff83cd: 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 452ecf0: SUCCESS

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 83.42541% with 30 lines in your changes missing coverage. Please review.

Project coverage is 71.49%. Comparing base (0dd892c) to head (452ecf0).
Report is 411 commits behind head on 2.x.

Files Patch % Lines
...rg/opensearch/snapshots/SnapshotShardsService.java 50.00% 7 Missing and 5 partials ⚠️
...in/java/org/opensearch/tasks/TaskCancellation.java 25.00% 5 Missing and 1 partial ⚠️
.../main/java/org/opensearch/search/ResourceType.java 54.54% 5 Missing ⚠️
...ch/repositories/blobstore/BlobStoreRepository.java 33.33% 1 Missing and 1 partial ⚠️
...search/backpressure/SearchBackpressureService.java 96.87% 0 Missing and 2 partials ⚠️
...ckpressure/trackers/TaskResourceUsageTrackers.java 91.30% 2 Missing ⚠️
...search/backpressure/trackers/HeapUsageTracker.java 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #14502      +/-   ##
============================================
+ Coverage     71.28%   71.49%   +0.21%     
- Complexity    60145    62271    +2126     
============================================
  Files          4957     5096     +139     
  Lines        282799   292810   +10011     
  Branches      41409    42683    +1274     
============================================
+ Hits         201591   209351    +7760     
- Misses        64189    65861    +1672     
- Partials      17019    17598     +579     

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

@sohami
Copy link
Collaborator

sohami commented Jun 24, 2024

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

#1703

@sohami
Copy link
Collaborator

sohami commented Jun 24, 2024

@kaushalmahi12 Can you please comment or link where changes were done in this PR to resolve backport errors

@kaushalmahi12
Copy link
Contributor Author

This PR: #10028 introduced the additional metric in stats API.

@sohami sohami merged commit 708c371 into opensearch-project:2.x Jun 24, 2024
34 checks passed
kkewwei pushed a commit to kkewwei/OpenSearch that referenced this pull request Jul 24, 2024
* Bug/sbp cancellation (opensearch-project#13474)

* change cancellation logic to fix disparity bw trackers and resource duress

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

* add additional tests for searchBackpressureService and refactor code

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

* add enumMap instead of list for tracking taskResourceUsageTrackets

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

* add nodeNotInDuress test for nodeDuressTrackers class

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

* address comments

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

* add entry in CHANGELOG

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

* address comments

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

* address comments

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

* remove wildcard import

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

* streamline imports

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

* address comments

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

* add additional test case to test the circuit breaker for SBP logic

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

* add missing javadoc to resourece type enum

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

* add javadoc to a method

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

* fix javadoc warnings

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

* fix javadoc warnings

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

---------

Signed-off-by: Kaushal Kumar <[email protected]>
(cherry picked from commit bcccedb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Bug/sbp cancellation (opensearch-project#13474)

* change cancellation logic to fix disparity bw trackers and resource duress

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

* add additional tests for searchBackpressureService and refactor code

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

* add enumMap instead of list for tracking taskResourceUsageTrackets

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

* add nodeNotInDuress test for nodeDuressTrackers class

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

* address comments

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

* add entry in CHANGELOG

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

* address comments

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

* address comments

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

* remove wildcard import

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

* streamline imports

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

* address comments

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

* add additional test case to test the circuit breaker for SBP logic

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

* add missing javadoc to resourece type enum

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

* add javadoc to a method

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

* fix javadoc warnings

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

* fix javadoc warnings

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

---------

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

* fix compilation error

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

---------

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>
Signed-off-by: kkewwei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants