-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add search backpressure cancellation at the coordinator level #5605
Merged
Bukhtawar
merged 49 commits into
opensearch-project:main
from
PritLadani:searchbackpressure/search-task-cancellation
Feb 5, 2023
+1,639
−438
Merged
Changes from 44 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
1402ced
Cancellation of in-flight search requests at coordinator level
PritLadani 9ccdae5
Cancellation of in-flight search requests at coordinator level
PritLadani 253fc61
Merge branch 'searchbackpressure/search-task-cancellation' of github.…
PritLadani 5817770
Fixing test failures
PritLadani dee7efb
Merge branch 'opensearch-project:main' into searchbackpressure/search…
PritLadani 1f188a3
java code formatting
PritLadani 64c6ed0
Adding unit tests and integration tests
PritLadani 5b846a2
Introducing separate thresholds for different task types
PritLadani 4778162
Adding java docs
PritLadani 5b0bf15
Moving cancellation settings to task specific settings
PritLadani ac0688f
Moving cancellation settings to task specific settings
PritLadani 663e4ee
Merge branch 'searchbackpressure/search-task-cancellation' of github.…
PritLadani 53609a7
Separating SearchTaskStats and SearchShardTaskStats
PritLadani 102cfd5
Cancellation of in-flight search requests at coordinator level
PritLadani 474be6c
Fixing test failures
PritLadani 72c5d87
java code formatting
PritLadani 0192d6c
Adding unit tests and integration tests
PritLadani b31b876
Introducing separate thresholds for different task types
PritLadani 6f75c23
Adding java docs
PritLadani 2f299ce
Moving cancellation settings to task specific settings
PritLadani 339a746
Separating SearchTaskStats and SearchShardTaskStats
PritLadani b2c2062
Merge branch 'searchbackpressure/search-task-cancellation' of github.…
PritLadani d2bcb88
Merge branch 'searchbackpressure/search-task-cancellation' of github.…
PritLadani bcc6483
Merge branch 'searchbackpressure/search-task-cancellation' of github.…
PritLadani 7d52b52
Changing default values for SearchTaskSettings
PritLadani 5933c2d
Adding version checks for SearchTaskStats
PritLadani d933936
Avoiding heap usage cancellation in case of undefined maximum heap me…
PritLadani e80e79d
Merge branch 'main' into searchbackpressure/search-task-cancellation
PritLadani 31f3f07
Moving limiters in SearchBackpressureState
PritLadani 26d19a0
code formatting
PritLadani 156225a
Merge branch 'main' into searchbackpressure/search-task-cancellation
PritLadani dd10073
Adding TaskManager#cancelTaskAndDescendants for task cancellation
PritLadani 9e0fa78
Removing heap usage tracker if heap size is undefined
PritLadani 3ff7116
Merge branch 'main' into searchbackpressure/search-task-cancellation
PritLadani 1f17964
Extracting CancellationListener
PritLadani 7d06d91
Extracting CancellationListener
PritLadani 950248d
Defining cancellation settings as volatile variables
PritLadani d9c113d
Separating SearchTaskStats and SearchShardTaskStats to avoid BWC issues
PritLadani 8e09787
Moving getTrackers to SearchBackpressureService
PritLadani 0732c74
Updating UTs
PritLadani 97533cb
Merge branch 'opensearch-project:main' into searchbackpressure/search…
PritLadani 4ee781c
Re-adding deprecated settings to address BWC issues
PritLadani d28cda6
Merge branch 'searchbackpressure/search-task-cancellation' of github.…
PritLadani 9cb6c6b
Merge branch 'opensearch-project:main' into searchbackpressure/search…
PritLadani 874cd97
Adding method to check if heap usage tracking is enabled
PritLadani e8df261
Merge branch 'searchbackpressure/search-task-cancellation' of github.…
PritLadani 881bdee
Isolating HEAP_SIZE_BYTES value
PritLadani 5da5817
Moving changelog to unreleased 2.x section
PritLadani bf19bf7
Merge branch 'main' into searchbackpressure/search-task-cancellation
Bukhtawar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
185 changes: 163 additions & 22 deletions
185
...src/internalClusterTest/java/org/opensearch/search/backpressure/SearchBackpressureIT.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
21 changes: 21 additions & 0 deletions
21
server/src/main/java/org/opensearch/search/backpressure/CancellationSettingsListener.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.search.backpressure; | ||
|
||
/** | ||
* Listener for callbacks related to cancellation settings | ||
*/ | ||
public interface CancellationSettingsListener { | ||
|
||
void onRatioChanged(double ratio); | ||
|
||
void onRateChanged(double rate); | ||
|
||
void onBurstChanged(double burst); | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this go into the next 2.x release? If so, please move this to the unreleased 2.x section and make sure the appropriate labels get added to the PR.
Also, it's probably better to link to the issue (#5173), and can you rewrite this in the imperative mood? Maybe something like "Add backpressure cancellation of search tasks at the coordinator level"? But please feel free to rewrite that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well yes, this should go in 2.x release, will move it to unreleased 2.x section and update labels.
Sure, will rewrite it as "Add search backpressure cancellation at the coordinator level".
About linking the issue, I have already mentioned the issue id in the PR description. What else should be done here?
Edit: I am not able to add the labels yet. Is it possible for you to add the labels? or @Bukhtawar can you help me add the labels to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the labels. I just mean put the link to the issue instead of the PR in the changelog. It has more relevant information for a user that wants to learn more about this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the labels.
Agree on relevancy but I do not see any entry with the issue link. Am I missing something or it's fine to add issue link?