Skip to content

Commit

Permalink
Remove debug logging in query cache stats (elastic#70279)
Browse files Browse the repository at this point in the history
  • Loading branch information
danhermann committed Apr 5, 2021
1 parent e3b3bd2 commit 67b98e5
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 67b98e5

Please sign in to comment.