-
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
Fix Shallow copy snapshot failures on closed index #16868
Fix Shallow copy snapshot failures on closed index #16868
Conversation
❌ Gradle check result for 88c3280: 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 e4fd52b: 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16868 +/- ##
============================================
+ Coverage 72.20% 72.25% +0.04%
+ Complexity 65289 65262 -27
============================================
Files 5299 5299
Lines 303536 303565 +29
Branches 43941 43947 +6
============================================
+ Hits 219180 219329 +149
+ Misses 66441 66227 -214
- Partials 17915 18009 +94 ☔ View full report in Codecov by Sentry. |
b0ea945
to
3e86036
Compare
server/src/main/java/org/opensearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/repositories/FilterRepository.java
Outdated
Show resolved
Hide resolved
❕ Gradle check result for ec0f609: 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. |
Signed-off-by: Shubh Sahu <[email protected]>
Signed-off-by: Shubh Sahu <[email protected]>
Signed-off-by: Shubh Sahu <[email protected]>
Signed-off-by: Shubh Sahu <[email protected]>
Signed-off-by: Shubh Sahu <[email protected]>
ec0f609
to
f495cad
Compare
server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/repositories/blobstore/BlobStoreRepository.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/repositories/blobstore/BlobStoreRepository.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Shubh Sahu <[email protected]>
❌ Gradle check result for 3947531: 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/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreIT.java
Show resolved
Hide resolved
Signed-off-by: Shubh Sahu <[email protected]>
Added ITs & UTs to cover most of the new lines added, but since IT doesn't account for code-coverage, codecov is failing. |
* Fix shallow v1 snapshot failures on closed index Signed-off-by: Shubh Sahu <[email protected]> * UT fix Signed-off-by: Shubh Sahu <[email protected]> * Adding UT Signed-off-by: Shubh Sahu <[email protected]> * small fix Signed-off-by: Shubh Sahu <[email protected]> * Addressing comments Signed-off-by: Shubh Sahu <[email protected]> * Addressing comments Signed-off-by: Shubh Sahu <[email protected]> * Modifying IT to restore snapshot Signed-off-by: Shubh Sahu <[email protected]> --------- Signed-off-by: Shubh Sahu <[email protected]> Co-authored-by: Shubh Sahu <[email protected]> (cherry picked from commit 2eadf12) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix shallow v1 snapshot failures on closed index * UT fix * Adding UT * small fix * Addressing comments * Addressing comments * Modifying IT to restore snapshot --------- (cherry picked from commit 2eadf12) Signed-off-by: Shubh Sahu <[email protected]> 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> Co-authored-by: Shubh Sahu <[email protected]>
Description
We observed for a remote-store backed index, if the index get’s closed, the shallow snapshot fails for the shard with error :
java.nio.file.NoSuchFileException: Metadata file is not present for given primary term <X> and generation <Y>
.On root causing the issue we found :
Approach :
Related Issues
Resolves [#13805]
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.