Restore default shard_path_type to FIXED for snapshot repositories#20940
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>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20940 +/- ##
============================================
+ Coverage 73.16% 73.25% +0.08%
- Complexity 72545 72623 +78
============================================
Files 5848 5848
Lines 331982 331982
Branches 47949 47949
============================================
+ Hits 242892 243187 +295
+ Misses 69561 69278 -283
+ Partials 19529 19517 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Gaurav Bafna <85113518+gbbafna@users.noreply.github.com>
|
Failed to generate code suggestions for PR |
…pensearch-project#20940) 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> Co-authored-by: easonysliu <easonysliu@tencent.com> Signed-off-by: Gagan Dhakrey <gagandhakrey@Gagans-MacBook-Pro.local>
…pensearch-project#20940) 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> Co-authored-by: easonysliu <easonysliu@tencent.com> Signed-off-by: Aparajita Pandey <aparajita31pandey@gmail.com>
…pensearch-project#20940) 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> Co-authored-by: easonysliu <easonysliu@tencent.com>
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.