-
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
Support cancellation for admin apis #13966
Support cancellation for admin apis #13966
Conversation
❌ Gradle check result for da592e1: 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? |
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 your work, but is there an issue related to your PR? It's better that each PR has a related PR to make sure everybody learn the idea and get more details about it, and please add some description about the code change in your PR to accelerate the reviewing process. In addition, please add a change log for this PR, and unit tests or yml tests for the code change are also needed.
❌ Gradle check result for 9152bbf: 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 75cbb40: 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? |
server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodesStatsRequest.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/GetTaskResponse.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/search/TransportSearchAction.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/admin/cluster/ClusterTask.java
Outdated
Show resolved
Hide resolved
...in/java/org/opensearch/action/admin/cluster/node/tasks/create/TransportCreateTaskAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/admin/AdminAPIsUtility.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/admin/AdminAPIsUtility.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/rest/action/cat/RestCreateTaskActionTests.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/transport/TransportService.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 6381e77: 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: Somesh Gupta <[email protected]> Added license
6381e77
to
24d16a2
Compare
❌ Gradle check result for 24d16a2: 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 24d16a2: 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 e062a97: 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. |
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-13966-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9f814797d0fe57457359a1f8a1b222cea80dc003
# Push it to GitHub
git push --set-upstream origin backport/backport-13966-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 |
* Support cancellation for admin apis - add implementation for _cat/shards Signed-off-by: Somesh Gupta <[email protected]> (cherry picked from commit 9f81479)
* Support cancellation for admin apis (#13966) * Support cancellation for admin apis - add implementation for _cat/shards Signed-off-by: Somesh Gupta <[email protected]> (cherry picked from commit 9f81479)
* Support cancellation for admin apis - add implementation for _cat/shards Signed-off-by: Somesh Gupta <[email protected]>
* Support cancellation for admin apis - add implementation for _cat/shards Signed-off-by: Somesh Gupta <[email protected]>
* Support cancellation for admin apis - add implementation for _cat/shards Signed-off-by: Somesh Gupta <[email protected]>
* Support cancellation for admin apis - add implementation for _cat/shards Signed-off-by: Somesh Gupta <[email protected]>
Description
Today, some APIs support only top-level timeouts, where a request is cancelled if it doesn't receive a response within the default 30-second timeout. However, the problem arises when these APIs internally make transport calls to cluster manager or other data nodes within the cluster even after the timeout expires. These internal/child calls, which are spawned by the API, are never timed out or cancelled, even though the top-level request was timed out. As a result, the cluster continues to perform unnecessary (wasteful) work and consuming resources but the user is not waiting for a response.
Related Issues
Resolves #13908
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.