Log IndexShard.refresh logs under trace (#18435)

We log them every second...
This commit is contained in:
Boaz Leskes 2016-05-19 17:12:37 +02:00
parent 757ccf00b2
commit 4d6887075f
1 changed files with 9 additions and 3 deletions

View File

@ -576,16 +576,22 @@ public class IndexShard extends AbstractIndexShardComponent {
long bytes = getEngine().getIndexBufferRAMBytesUsed(); long bytes = getEngine().getIndexBufferRAMBytesUsed();
writingBytes.addAndGet(bytes); writingBytes.addAndGet(bytes);
try { try {
logger.debug("refresh with source [{}] indexBufferRAMBytesUsed [{}]", source, new ByteSizeValue(bytes)); if (logger.isTraceEnabled()) {
logger.trace("refresh with source [{}] indexBufferRAMBytesUsed [{}]", source, new ByteSizeValue(bytes));
}
long time = System.nanoTime(); long time = System.nanoTime();
getEngine().refresh(source); getEngine().refresh(source);
refreshMetric.inc(System.nanoTime() - time); refreshMetric.inc(System.nanoTime() - time);
} finally { } finally {
logger.debug("remove [{}] writing bytes for shard [{}]", new ByteSizeValue(bytes), shardId()); if (logger.isTraceEnabled()) {
logger.trace("remove [{}] writing bytes for shard [{}]", new ByteSizeValue(bytes), shardId());
}
writingBytes.addAndGet(-bytes); writingBytes.addAndGet(-bytes);
} }
} else { } else {
logger.debug("refresh with source [{}]", source); if (logger.isTraceEnabled()) {
logger.trace("refresh with source [{}]", source);
}
long time = System.nanoTime(); long time = System.nanoTime();
getEngine().refresh(source); getEngine().refresh(source);
refreshMetric.inc(System.nanoTime() - time); refreshMetric.inc(System.nanoTime() - time);