-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
ClusterManagerTaskThrottler Improvements #15508
ClusterManagerTaskThrottler Improvements #15508
Conversation
767f990
to
b627fac
Compare
+ Add shallow check in ClusterManagerTaskThrottler's onBeginSubmit method before computeIfPresent to avoid lock when queue is full + Remove stack trace filling in ClusterManagerThrottlingException Signed-off-by: Sumit Bansal <[email protected]>
b627fac
to
2ada278
Compare
❌ Gradle check result for 767f990: 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? |
❌ Gradle check result for b627fac: 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: Sumit Bansal <[email protected]>
❕ Gradle check result for 27b68c5: 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15508 +/- ##
============================================
+ Coverage 71.85% 71.90% +0.04%
- Complexity 64054 64090 +36
============================================
Files 5269 5269
Lines 299679 299687 +8
Branches 43311 43310 -1
============================================
+ Hits 215343 215480 +137
+ Misses 66693 66480 -213
- Partials 17643 17727 +84 ☔ View full report in Codecov by Sentry. |
server/src/main/java/org/opensearch/cluster/service/ClusterManagerTaskThrottler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/service/ClusterManagerTaskThrottler.java
Outdated
Show resolved
Hide resolved
1ca0ac0
to
6249251
Compare
❌ Gradle check result for 1ca0ac0: 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: Sumit Bansal <[email protected]>
6249251
to
d80be09
Compare
Signed-off-by: Sumit Bansal <[email protected]>
The backport to
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-15508-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 17b5f98c5e28c5b56fe88d39513c4ce119600b9c
# Push it to GitHub
git push --set-upstream origin backport/backport-15508-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 |
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]> (cherry picked from commit 17b5f98)
Raised backport - #15647 |
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
…5671) * ClusterManagerTaskThrottler Improvements (#15508) * [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
* ClusterManagerTaskThrottler Improvements (#15508) Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]> (cherry picked from commit 17b5f98)
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
* [ClusterManagerTaskThrottler Improvements] : Add shallow check in ClusterManagerTaskThrottler to fail fast before computeIfPresent to avoid lock when queue is full Signed-off-by: Sumit Bansal <[email protected]>
Description
ClusterManagerTaskThrottler Improvements
Add shallow check in ClusterManagerTaskThrottler's onBeginSubmit method before computeIfPresent to avoid lock when queue is full
Remove stack trace filling in ClusterManagerThrottlingException
Update log level from WARN to trace for performance improvements.
Added unit test to verify throttling during shallow check when lock is acquired on task count map by different thread.
Related Issues
#13741
Testing
Check List
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.