-
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
Implementing pagination for _cat/shards #14641
Implementing pagination for _cat/shards #14641
Conversation
❌ Gradle check result for 671bb92: 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/indices/cluster/IndicesClusterStateService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/metadata/Metadata.java
Outdated
Show resolved
Hide resolved
671bb92
to
549427a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14641 +/- ##
============================================
+ Coverage 71.88% 72.01% +0.12%
- Complexity 64546 64714 +168
============================================
Files 5296 5298 +2
Lines 301754 301952 +198
Branches 43588 43627 +39
============================================
+ Hits 216910 217439 +529
+ Misses 67040 66723 -317
+ Partials 17804 17790 -14 ☔ View full report in Codecov by Sentry. |
server/src/main/java/org/opensearch/rest/action/cat/RestTable.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/cat/RestTable.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/cat/RestTable.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/cat/RestShardsAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/cat/RestShardsAction.java
Outdated
Show resolved
Hide resolved
Please make sure to queue up an update to the OpenAPI spec in https://github.com/opensearch-project/opensearch-api-specification with this. |
This PR is stalled because it has been open for 30 days with no activity. |
549427a
to
578d510
Compare
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
578d510
to
437b87f
Compare
❌ Gradle check result for 437b87f: 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/shards/CatShardsRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
❌ Gradle check result for 6c855ce: 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: Harsh Garg <gkharsh@amazon.com>
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
server/src/main/java/org/opensearch/action/pagination/IndexPaginationStrategy.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
82786d2
to
757b837
Compare
❌ Gradle check result for 757b837: 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: Harsh Garg <gkharsh@amazon.com>
❕ Gradle check result for 4698858: 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. |
server/src/main/java/org/opensearch/action/admin/cluster/shards/CatShardsResponse.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/pagination/ShardPaginationStrategy.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/pagination/ShardPaginationStrategy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/pagination/ShardPaginationStrategy.java
Show resolved
Hide resolved
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
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-14641-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a81b868facc186728b3d35fd65a6d95621f1dd82
# Push it to GitHub
git push --set-upstream origin backport/backport-14641-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 |
* Adding _list/shards API Signed-off-by: Harsh Garg <gkharsh@amazon.com>
* Adding _list/shards API Signed-off-by: Harsh Garg <gkharsh@amazon.com>
* Adding _list/shards API Signed-off-by: Harsh Garg <gkharsh@amazon.com>
* Adding _list/shards API Signed-off-by: Harsh Garg <gkharsh@amazon.com>
Description
This change is targeted towards implementing pagination for
_cat/shards
API. A new parameter,nextToken
, has been introduced as both the query parameter as well as in the response body.Functional Testing Details:
Started a 9 data nodes local cluster having 3 indices (each with 2 primaries and 3 replicas).
_cat/shards response
_list/shards with plain text response:
_list/shards with JSON response format:
Related Issues
Resolves #14257
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.