Skip to content

Commit

Permalink
Remove debug logging in query cache stats (elastic#70279) (elastic#70460
Browse files Browse the repository at this point in the history
)
  • Loading branch information
danhermann authored Mar 16, 2021
1 parent 9007cd5 commit 58b6c54
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 58b6c54

Please sign in to comment.