From 7e3ee6da5711a7776ad25f882d2ec4c006cd7bc1 Mon Sep 17 00:00:00 2001 From: Shubh Sahu Date: Tue, 11 Jun 2024 11:43:36 +0530 Subject: [PATCH] Adding back DEFAULT_CHUNK_SIZE to be visible to public API (#14158) Signed-off-by: Shubh Sahu --- .../org/opensearch/indices/recovery/RecoverySettings.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/indices/recovery/RecoverySettings.java b/server/src/main/java/org/opensearch/indices/recovery/RecoverySettings.java index 4d8bdee45958c..7d9f0c0762e46 100644 --- a/server/src/main/java/org/opensearch/indices/recovery/RecoverySettings.java +++ b/server/src/main/java/org/opensearch/indices/recovery/RecoverySettings.java @@ -177,9 +177,11 @@ public class RecoverySettings { ); // choose 512KB-16B to ensure that the resulting byte[] is not a humongous allocation in G1. + public static final ByteSizeValue DEFAULT_CHUNK_SIZE = new ByteSizeValue(512 * 1024 - 16, ByteSizeUnit.BYTES); + public static final Setting INDICES_RECOVERY_CHUNK_SIZE_SETTING = Setting.byteSizeSetting( "indices.recovery.chunk_size", - new ByteSizeValue(512 * 1024 - 16, ByteSizeUnit.BYTES), + DEFAULT_CHUNK_SIZE, new ByteSizeValue(1, ByteSizeUnit.BYTES), new ByteSizeValue(100, ByteSizeUnit.MB), Property.Dynamic,