Add validation for the search backpressure cancellation settings#15501
Merged
reta merged 10 commits intoopensearch-project:mainfrom Sep 17, 2024
Merged
Add validation for the search backpressure cancellation settings#15501reta merged 10 commits intoopensearch-project:mainfrom
reta merged 10 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Contributor
Author
Contributor
|
❌ Gradle check result for adcf328: 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? |
reta
reviewed
Aug 29, 2024
...er/src/main/java/org/opensearch/search/backpressure/settings/SearchBackpressureSettings.java
Show resolved
Hide resolved
Contributor
|
❌ Gradle check result for f518b2e: 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: Gao Binlong <gbinlong@amazon.com>
Contributor
rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/10_basic.yml
Show resolved
Hide resolved
reta
approved these changes
Sep 17, 2024
Contributor
|
Sorry @gaobinlong , completely forgot about this change |
Contributor
|
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-15501-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8347d0ec22aa865dea3bc4b2027fb7bdf486fab2
# Push it to GitHub
git push --set-upstream origin backport/backport-15501-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.xThen, create a pull request where the |
Contributor
|
@gaobinlong could you please backport to |
gaobinlong
added a commit
to gaobinlong/OpenSearch
that referenced
this pull request
Sep 18, 2024
…nsearch-project#15501) * Fix updating search backpressure settings crashing the cluster Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix version check Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Increase test coverage Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Format the code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Optimize some code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix typo Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> (cherry picked from commit 8347d0e)
3 tasks
sachinpkale
pushed a commit
to sachinpkale/OpenSearch
that referenced
this pull request
Sep 19, 2024
…nsearch-project#15501) * Fix updating search backpressure settings crashing the cluster Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix version check Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Increase test coverage Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Format the code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Optimize some code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix typo Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com>
reta
pushed a commit
that referenced
this pull request
Sep 19, 2024
…n settings (#15969) * Add validation for the search backpressure cancellation settings (#15501) * Fix updating search backpressure settings crashing the cluster Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix version check Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Increase test coverage Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Format the code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Optimize some code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix typo Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> (cherry picked from commit 8347d0e) * Update version check in yml test file Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com>
UglyJoevIne
approved these changes
Sep 20, 2024
UglyJoevIne
approved these changes
Sep 20, 2024
dk2k
pushed a commit
to dk2k/OpenSearch
that referenced
this pull request
Oct 16, 2024
…nsearch-project#15501) * Fix updating search backpressure settings crashing the cluster Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix version check Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Increase test coverage Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Format the code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Optimize some code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix typo Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com>
dk2k
pushed a commit
to dk2k/OpenSearch
that referenced
this pull request
Oct 17, 2024
…nsearch-project#15501) * Fix updating search backpressure settings crashing the cluster Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix version check Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Increase test coverage Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Format the code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Optimize some code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix typo Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com>
dk2k
pushed a commit
to dk2k/OpenSearch
that referenced
this pull request
Oct 21, 2024
…nsearch-project#15501) * Fix updating search backpressure settings crashing the cluster Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix version check Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Increase test coverage Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Format the code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Optimize some code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix typo Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com>
akolarkunnu
pushed a commit
to akolarkunnu/OpenSearch
that referenced
this pull request
Jan 21, 2025
…nsearch-project#15501) * Fix updating search backpressure settings crashing the cluster Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Modify change log Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix version check Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Increase test coverage Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Format the code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Optimize some code Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix typo Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com>
This was referenced Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updating the cluster level setting
search_backpressure.cancellation_burst(deprecated),search_backpressure.search_task.cancellation_burstorsearch_backpressure.search_shard_task.cancellation_burstto an non-default value cause the cluster crash, the reason is that the value ofcancellationRateis always 0 here:OpenSearch/server/src/main/java/org/opensearch/search/backpressure/SearchBackpressureState.java
Line 101 in 2b84305
, so an exception is thrown here:
OpenSearch/server/src/main/java/org/opensearch/common/util/TokenBucket.java
Line 51 in 2b84305
Just like
cancellationRatio, we also need to get the value ofcancellationRatefrom the cluster settings and pass it to the constructor method ofSearchBackpressureState.Another issue is that we don't have some validations for the setting
cancellationRateandcancellationRatio, so when updating these two settings to 0, the same exception "rate must be greater than zero" is also thrown and then crash the cluster.Related Issues
#15495
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.