-
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
Fix stale index deletion in snapshots for hashed prefix path type #16617
Fix stale index deletion in snapshots for hashed prefix path type #16617
Conversation
Signed-off-by: Ashish Singh <[email protected]>
fb23dc0
to
706710c
Compare
server/src/main/java/org/opensearch/repositories/blobstore/BlobStoreRepository.java
Outdated
Show resolved
Hide resolved
165deac
to
8d819de
Compare
❌ Gradle check result for 8d819de: 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: Ashish Singh <[email protected]>
8d819de
to
c172683
Compare
❌ Gradle check result for c172683: 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/snapshots/SnapshotShardPaths.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/SnapshotShardPaths.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/repositories/blobstore/BlobStoreRepository.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ashish Singh <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16617 +/- ##
============================================
- Coverage 72.15% 72.07% -0.09%
+ Complexity 65145 65043 -102
============================================
Files 5315 5315
Lines 303573 303590 +17
Branches 43925 43928 +3
============================================
- Hits 219039 218802 -237
- Misses 66587 66863 +276
+ Partials 17947 17925 -22 ☔ View full report in Codecov by Sentry. |
…6617) Signed-off-by: Ashish Singh <[email protected]> (cherry picked from commit 4cce608) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…6617) (#16637) (cherry picked from commit 4cce608) Signed-off-by: Ashish Singh <[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>
Description
If the index name has
.
period in it, then the stale index deletion fails as the period character interferes with the delimiter (which is also period character) by giving more parts than expected during theString.split(".")
operation while interpreting the snapshot shards path file. The fix is to handle the variables after the index name as relative from last than from 0. This fixes the problem.Check List
[ ] 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.