From a04ea2734a52623cc622ba96416f03988dd40586 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Tue, 23 Jul 2024 12:07:35 -0700 Subject: [PATCH] Add block size setting to file_cache Signed-off-by: Finn Carroll --- .../store/remote/filecache/FileCacheSettings.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCacheSettings.java b/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCacheSettings.java index 76086be932ecb..0dea862df66bc 100644 --- a/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCacheSettings.java +++ b/server/src/main/java/org/opensearch/index/store/remote/filecache/FileCacheSettings.java @@ -33,6 +33,20 @@ public class FileCacheSettings { Setting.Property.Dynamic ); + /** + * The size in bytes of blocks downloaded from the remote store into local file cache to service requests. + * Note that almost always the full block is downloaded, regardless of how much data from the block is actually + * required for an operation. + */ + public static final Setting FILE_CACHE_LOCAL_BLOCK_SHIFT_SETTING = Setting.intSetting( + "cluster.filecache.block_shift", + 23, + 10, + 30, + Setting.Property.NodeScope, + Setting.Property.Dynamic + ); + private volatile double remoteDataRatio; public FileCacheSettings(Settings settings, ClusterSettings clusterSettings) {