From 4087280f6cb58dd354a7e204bb7441b98d558dcf Mon Sep 17 00:00:00 2001 From: Kiran Prakash Date: Tue, 2 Apr 2024 11:16:10 -0700 Subject: [PATCH] Update IndicesRequestCache.java Signed-off-by: Kiran Prakash --- .../java/org/opensearch/indices/IndicesRequestCache.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java index 0cc3be88a9bcb..1ef1446ec165c 100644 --- a/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java +++ b/server/src/main/java/org/opensearch/indices/IndicesRequestCache.java @@ -471,7 +471,13 @@ class IndicesRequestCacheCleanupManager implements Closeable { void updateStalenessThreshold(double stalenessThreshold) { double oldStalenessThreshold = this.stalenessThreshold; this.stalenessThreshold = stalenessThreshold; - logger.debug(" StalenessThreshold is updated from : " + oldStalenessThreshold + " to : " + this.stalenessThreshold); + if (logger.isDebugEnabled()) { + logger.debug( + "Staleness threshold for indices request cache changed to {} from {}", + this.stalenessThreshold, + oldStalenessThreshold + ); + } } /**