From 58b6c54699bcf55b9f23b14defec5404451f132f Mon Sep 17 00:00:00 2001 From: Dan Hermann Date: Tue, 16 Mar 2021 09:33:15 -0500 Subject: [PATCH] Remove debug logging in query cache stats (#70279) (#70460) --- .../index/cache/query/QueryCacheStats.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java b/server/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java index b0098d6ee2a7a..2b704de6960da 100644 --- a/server/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java +++ b/server/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java @@ -10,9 +10,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.search.DocIdSet; -import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; @@ -58,17 +56,6 @@ public void add(QueryCacheStats stats) { missCount += stats.missCount; cacheCount += stats.cacheCount; cacheSize += stats.cacheSize; - - // log only the first time a negative value is encountered for query cache size - // see: https://github.com/elastic/elasticsearch/issues/55434 - if (ramBytesUsed < -1 && (ramBytesUsed + stats.ramBytesUsed >= 0)) { - logger.debug(() -> new ParameterizedMessage( - "negative query cache size [{}] on thread [{}] with stats [{}] and stack trace:\n{}", - ramBytesUsed, - Thread.currentThread().getName(), - stats.ramBytesUsed, - ExceptionsHelper.formatStackTrace(Thread.currentThread().getStackTrace()))); - } } public long getMemorySizeInBytes() {