Restore default shard_path_type to FIXED for snapshot repositories#20940
Open
mango766 wants to merge 1 commit intoopensearch-project:mainfrom
Open
Restore default shard_path_type to FIXED for snapshot repositories#20940mango766 wants to merge 1 commit intoopensearch-project:mainfrom
mango766 wants to merge 1 commit intoopensearch-project:mainfrom
Conversation
PR opensearch-project#18163 changed the default shard_path_type from FIXED to HASHED_PREFIX, which causes snapshot blobs to be uploaded outside the configured base_path. This is a breaking change for users upgrading from 2.x to 3.x, as it breaks incremental backups and places files outside the expected repository path. Restoring the default to FIXED to match the 2.x behavior and the existing IndexId.DEFAULT_SHARD_PATH_TYPE constant. Signed-off-by: mango766 <mango766@users.noreply.github.com> Signed-off-by: easonysliu <easonysliu@tencent.com>
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20940 +/- ##
============================================
- Coverage 73.27% 73.24% -0.03%
+ Complexity 72497 72442 -55
============================================
Files 5819 5819
Lines 331352 331352
Branches 47875 47875
============================================
- Hits 242784 242699 -85
- Misses 69065 69151 +86
+ Partials 19503 19502 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Restores the default value of
shard_path_typeinBlobStoreRepositoryfromHASHED_PREFIXback toFIXED.PR #18163 changed this default, which causes snapshot shard blobs to be uploaded outside the configured
base_pathin storage services like S3/MinIO. This is a breaking change for anyone upgrading from 2.x to 3.x — incremental backups fail because the new path layout is incompatible with existing repositories. The change also went in without a changelog entry.The fix aligns the repository setting default with the existing
IndexId.DEFAULT_SHARD_PATH_TYPEconstant, which is alreadyFIXED. Users who wantHASHED_PREFIXcan still set it explicitly when registering their repository.Related Issues
Resolves #20643
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.