From c731564095d9fd5cf2f6a40dce4ae11a27b9d2bb Mon Sep 17 00:00:00 2001 From: Kiran Prakash Date: Tue, 12 Mar 2024 13:41:39 -0700 Subject: [PATCH] remove settings related Signed-off-by: Kiran Prakash --- .../indices/IndicesRequestCache.java | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java index 4cc118076d6b5..edf6a1a5ea560 100644 --- a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java +++ b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java @@ -38,7 +38,6 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.util.Accountable; import org.apache.lucene.util.RamUsageEstimator; -import org.opensearch.OpenSearchParseException; import org.opensearch.common.CheckedSupplier; import org.opensearch.common.cache.CacheType; import org.opensearch.common.cache.ICache; @@ -53,7 +52,6 @@ import org.opensearch.common.settings.Setting; import org.opensearch.common.settings.Setting.Property; import org.opensearch.common.settings.Settings; -import org.opensearch.common.unit.RatioValue; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.concurrent.ConcurrentCollections; import org.opensearch.core.common.bytes.BytesReference; @@ -125,17 +123,6 @@ public final class IndicesRequestCache extends AbstractLifecycleComponent new TimeValue(0), Property.NodeScope ); - public static final Setting INDICES_REQUEST_CACHE_CLEAN_INTERVAL_SETTING = Setting.positiveTimeSetting( - "indices.requests.cache.cleanup.interval", - TimeValue.timeValueMinutes(1), - Property.NodeScope - ); - public static final Setting INDICES_REQUEST_CACHE_STALENESS_THRESHOLD_SETTING = new Setting<>( - "indices.requests.cache.cleanup.staleness_threshold", - "0%", - IndicesRequestCache::validateStalenessSetting, - Property.NodeScope - ); private final static long BASE_RAM_BYTES_USED = RamUsageEstimator.shallowSizeOfInstance(Key.class); @@ -742,26 +729,4 @@ long count() { int numRegisteredCloseListeners() { // for testing return registeredClosedListeners.size(); } - - /** - * Validates the staleness setting for the cache cleanup threshold. - * - *

This method checks if the provided staleness threshold is a valid percentage or a valid double value. - * If the staleness threshold is not valid, it throws an OpenSearchParseException. - * - * @param staleThreshold The staleness threshold to validate. - * @return The validated staleness threshold. - * @throws OpenSearchParseException If the staleness threshold is not a valid percentage or double value. - * - *

package private for testing - */ - static String validateStalenessSetting(String staleThreshold) { - try { - RatioValue.parseRatioValue(staleThreshold); - } catch (OpenSearchParseException e) { - e.addSuppressed(e); - throw e; - } - return staleThreshold; - } }