Skip to content

Commit

Permalink
Change default path type
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Singh <[email protected]>
  • Loading branch information
ashking94 committed May 23, 2024
1 parent cea63e0 commit 3e456af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class RemoteStoreSettings {
@ExperimentalApi
public static final Setting<RemoteStoreEnums.PathType> CLUSTER_REMOTE_STORE_PATH_TYPE_SETTING = new Setting<>(
"cluster.remote_store.index.path.type",
RemoteStoreEnums.PathType.FIXED.toString(),
RemoteStoreEnums.PathType.HASHED_PREFIX.toString(),
RemoteStoreEnums.PathType::parseString,
Property.NodeScope,
Property.Dynamic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ public void testGetPathStrategyStrategyWithDynamicUpdate() {
assertEquals(PathType.HASHED_PREFIX, resolver.getPathStrategy().getType());
assertEquals(PathHashAlgorithm.FNV_1A_COMPOSITE_1, resolver.getPathStrategy().getHashAlgorithm());

// Set FIXED with null hash algorithm
clusterSettings.applySettings(Settings.builder().put(CLUSTER_REMOTE_STORE_PATH_TYPE_SETTING.getKey(), PathType.FIXED).build());
assertEquals(PathType.FIXED, resolver.getPathStrategy().getType());
assertNull(resolver.getPathStrategy().getHashAlgorithm());

// Set HASHED_PREFIX with FNV_1A_BASE64 hash algorithm
clusterSettings.applySettings(
Settings.builder()
Expand Down

0 comments on commit 3e456af

Please sign in to comment.