Skip to content

Commit 8ffa576

Browse files
mango766easonysliu
andauthored
Restore default shard_path_type to FIXED for snapshot repositories (#20940)
PR #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>
1 parent 14faf38 commit 8ffa576

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6666
- Fix stale segment cleanup logic for remote store ([#20976](https://github.com/opensearch-project/OpenSearch/pull/20976))
6767
- Ensure that transient ThreadContext headers with propagators survive restore ([#169373](https://github.com/opensearch-project/OpenSearch/pull/20854))
6868
- Handle dependencies between analyzers ([#19248](https://github.com/opensearch-project/OpenSearch/pull/19248))
69+
- Restore default `shard_path_type` to FIXED for snapshot repositories ([#20643](https://github.com/opensearch-project/OpenSearch/issues/20643))
6970
- Fix `_field_caps` returning empty results and corrupted field names for `disable_objects: true` mappings ([#20800](https://github.com/opensearch-project/OpenSearch/pull/20800))
7071

7172
### Dependencies

server/src/main/java/org/opensearch/repositories/blobstore/BlobStoreRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ protected static long calculateMaxWithinIntLimit(long defaultThresholdOfHeap, lo
418418

419419
public static final Setting<PathType> SHARD_PATH_TYPE = new Setting<>(
420420
"shard_path_type",
421-
PathType.HASHED_PREFIX.toString(),
421+
PathType.FIXED.toString(),
422422
PathType::parseString
423423
);
424424

0 commit comments

Comments
 (0)