Skip to content
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

Snapshot _status API: Include in-progress snapshots in total shard count and index filter #16394

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

ltaragi
Copy link
Contributor

@ltaragi ltaragi commented Oct 20, 2024

Description

  • In [SnapshotV2] Snapshot Status API changes #15409,

    • We added changes to impose an upper limit on the number of shards that can be included in the snapshot status API's response with the help of snapshot.max_shards_allowed_in_status_api dynamic cluster setting.
    • We also added a variant of the API to pass a comma-separated list of index names (for a singular snapshot only) to manage the shard count in its response
  • We also need to extend the same to the shards contributed by running snapshots in the APIs response.

    • While calculating the total number of required shards in the response, the shards of running snapshots must also be accounted for.
    • Similarly, users should be able to pass an index list for a running snapshot and get status for only the relevant indices in the response
  • Added stricter checks for when to allow an index-filter (particular snapshot in a particular repository):

    • We can invalidate requests with _all value for repository or snapshot parameter of the API request
    • _all value for index parameter results to no index-filter at all
  • In case of index-filter and ignore_unavailable as true, the missing indices should be removed from the set of indices which ultimately comprise the final response

  • Improved the exception messages for clarity

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@ltaragi ltaragi changed the title Include running snapshots in total shard count and index filter _status API: Include running snapshots in total shard count and index filter Oct 20, 2024
Copy link
Contributor

✅ Gradle check result for eb39c25: SUCCESS

Copy link

codecov bot commented Oct 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 88 lines in your changes missing coverage. Please review.

Project coverage is 71.96%. Comparing base (ad7f9e7) to head (57cfd5f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...apshots/status/TransportSnapshotsStatusAction.java 0.00% 78 Missing ⚠️
...uster/snapshots/status/SnapshotsStatusRequest.java 0.00% 8 Missing ⚠️
...ction/admin/cluster/RestSnapshotsStatusAction.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16394      +/-   ##
============================================
- Coverage     72.05%   71.96%   -0.09%     
+ Complexity    64861    64793      -68     
============================================
  Files          5309     5309              
  Lines        302734   302785      +51     
  Branches      43733    43750      +17     
============================================
- Hits         218134   217901     -233     
- Misses        66731    67003     +272     
- Partials      17869    17881      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ltaragi ltaragi marked this pull request as ready for review October 21, 2024 04:43
@sachinpkale sachinpkale changed the title _status API: Include running snapshots in total shard count and index filter Snapshot _status API: Include in-progress snapshots in total shard count and index filter Oct 21, 2024
@ltaragi ltaragi force-pushed the snap-status-running branch from 160e8ed to 2719b75 Compare October 21, 2024 09:22
Copy link
Contributor

❌ Gradle check result for ef2af69: 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?

Copy link
Contributor

❌ Gradle check result for 5146d60: 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?

@ltaragi
Copy link
Contributor Author

ltaragi commented Oct 21, 2024

❌ Gradle check result for 5146d60: 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?

Flaky test #15807

Copy link
Contributor

❌ Gradle check result for 5146d60: 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: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
@ltaragi ltaragi force-pushed the snap-status-running branch from 5146d60 to 57cfd5f Compare October 21, 2024 15:40
Copy link
Contributor

✅ Gradle check result for 57cfd5f: SUCCESS

@gbbafna gbbafna merged commit 6c7581e into opensearch-project:main Oct 21, 2024
38 of 39 checks passed
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Oct 21, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 21, 2024
…unt and index filter (#16394)

Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
(cherry picked from commit 6c7581e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sachinpkale pushed a commit that referenced this pull request Oct 22, 2024
…unt and index filter (#16394) (#16411)

(cherry picked from commit 6c7581e)

Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants