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

Prevent deletion of snapshot backing index #5365

Merged

Conversation

Vishalks
Copy link
Contributor

@Vishalks Vishalks commented Nov 23, 2022

Description

The changes prevent deletion of remote searchable snapshots that are backing any indices

Issues Resolved

#4967

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

Prevent deletion of snapshots that are backing searchable snapshot indexes

Signed-off-by: Vishal Sarda <vsarda@amazon.com>
(cherry picked from commit 08ac17f)
Signed-off-by: Vishal Sarda <vsarda@amazon.com>
Signed-off-by: Vishal Sarda <vsarda@amazon.com>
Signed-off-by: Vishal Sarda <vsarda@amazon.com>
Signed-off-by: Vishal Sarda <vsarda@amazon.com>
@Vishalks Vishalks changed the title Backport/backport 5069 to 2.x Prevent deletion of snapshot backing index Nov 23, 2022
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross
Copy link
Member

FYI @Vishalks

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:forbiddenPatterns'.
> Found invalid patterns:
  - tab on line 2221 of server/src/main/java/org/opensearch/snapshots/SnapshotsService.java

@Vishalks
Copy link
Contributor Author

FYI @Vishalks

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:forbiddenPatterns'.
> Found invalid patterns:
  - tab on line 2221 of server/src/main/java/org/opensearch/snapshots/SnapshotsService.java

Yes, I am aware of it. Facing a weird issue where it doesn't show the tabs (mentioned in the error) on VIM and I am not able to open the code on backport branch in my IDE. Still working on it.

@Vishalks Vishalks closed this Nov 23, 2022
@Vishalks Vishalks reopened this Nov 23, 2022
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Vishal Sarda <vsarda@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.stats.IndexStatsIT.testFilterCacheStats

@codecov-commenter
Copy link

Codecov Report

Merging #5365 (eb8d34f) into 2.x (d74d992) will decrease coverage by 0.03%.
The diff coverage is 87.50%.

@@             Coverage Diff              @@
##                2.x    #5365      +/-   ##
============================================
- Coverage     70.67%   70.63%   -0.04%     
- Complexity    58308    58344      +36     
============================================
  Files          4700     4701       +1     
  Lines        279111   279131      +20     
  Branches      40749    40753       +4     
============================================
- Hits         197254   197170      -84     
- Misses        65377    65551     +174     
+ Partials      16480    16410      -70     
Impacted Files Coverage Δ
...arch/snapshots/SnapshotInUseDeletionException.java 40.00% <40.00%> (ø)
...g/opensearch/ingest/common/URLDecodeProcessor.java 87.50% <100.00%> (+17.50%) ⬆️
.../main/java/org/opensearch/OpenSearchException.java 92.05% <100.00%> (+0.01%) ⬆️
server/src/main/java/org/opensearch/Version.java 83.63% <100.00%> (ø)
...n/java/org/opensearch/snapshots/SnapshotUtils.java 87.30% <100.00%> (+3.96%) ⬆️
...ava/org/opensearch/snapshots/SnapshotsService.java 45.34% <100.00%> (+5.57%) ⬆️
...adonly/AddIndexBlockClusterStateUpdateRequest.java 0.00% <0.00%> (-75.00%) ⬇️
...readonly/TransportVerifyShardIndexBlockAction.java 9.75% <0.00%> (-58.54%) ⬇️
...n/admin/indices/readonly/AddIndexBlockRequest.java 17.85% <0.00%> (-53.58%) ⬇️
...indices/readonly/TransportAddIndexBlockAction.java 20.68% <0.00%> (-41.38%) ⬇️
... and 478 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@andrross andrross merged commit 05979b4 into opensearch-project:2.x Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants