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

Fix stale index deletion in snapshots for hashed prefix path type #16617

Merged

Conversation

ashking94
Copy link
Member

@ashking94 ashking94 commented Nov 11, 2024

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 the String.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

  • 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.

@ashking94 ashking94 force-pushed the fix-stale-cleanup-hashed-prefix branch from 165deac to 8d819de Compare November 11, 2024 17:25
Copy link
Contributor

❌ 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?

@ashking94 ashking94 force-pushed the fix-stale-cleanup-hashed-prefix branch from 8d819de to c172683 Compare November 12, 2024 05:02
Copy link
Contributor

❌ 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?

Signed-off-by: Ashish Singh <[email protected]>
Copy link
Contributor

✅ Gradle check result for fb50398: SUCCESS

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 4 lines in your changes missing coverage. Please review.

Project coverage is 72.07%. Comparing base (10873f1) to head (fb50398).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...ch/repositories/blobstore/BlobStoreRepository.java 88.88% 1 Missing and 2 partials ⚠️
...a/org/opensearch/snapshots/SnapshotShardPaths.java 85.71% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@gbbafna gbbafna merged commit 4cce608 into opensearch-project:main Nov 14, 2024
39 of 41 checks passed
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Nov 14, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 14, 2024
…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>
ashking94 pushed a commit that referenced this pull request Nov 14, 2024
…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>
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants