improve logging messages a bit
This commit is contained in:
parent
3744fb9dc0
commit
db832cce06
|
@ -543,7 +543,7 @@ public class InternalEngine extends Engine {
|
||||||
refresh("write indexing buffer");
|
refresh("write indexing buffer");
|
||||||
} else {
|
} else {
|
||||||
// Most of our heap is used by the indexing buffer, so we do a cheaper (just writes segments, doesn't open a new searcher) IW.flush:
|
// Most of our heap is used by the indexing buffer, so we do a cheaper (just writes segments, doesn't open a new searcher) IW.flush:
|
||||||
logger.debug("use flush to write indexing buffer (heap size=[{}]) since version map is small (heap size=[{}])",
|
logger.debug("use IndexWriter.flush to write indexing buffer (heap size=[{}]) since version map is small (heap size=[{}])",
|
||||||
new ByteSizeValue(indexingBufferBytes), new ByteSizeValue(versionMapBytes));
|
new ByteSizeValue(indexingBufferBytes), new ByteSizeValue(versionMapBytes));
|
||||||
indexWriter.flush();
|
indexWriter.flush();
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,8 +301,6 @@ public class IndexingMemoryController extends AbstractLifecycleComponent<Indexin
|
||||||
|
|
||||||
if (totalBytesUsed > indexingBuffer.bytes()) {
|
if (totalBytesUsed > indexingBuffer.bytes()) {
|
||||||
// OK we are now over-budget; fill the priority queue and ask largest shard(s) to refresh:
|
// OK we are now over-budget; fill the priority queue and ask largest shard(s) to refresh:
|
||||||
logger.debug("now write some indexing buffers: total indexing heap bytes used [{}] vs {} [{}], currently writing bytes [{}]",
|
|
||||||
new ByteSizeValue(totalBytesUsed), INDEX_BUFFER_SIZE_SETTING, indexingBuffer, new ByteSizeValue(totalBytesWriting));
|
|
||||||
PriorityQueue<ShardAndBytesUsed> queue = new PriorityQueue<>();
|
PriorityQueue<ShardAndBytesUsed> queue = new PriorityQueue<>();
|
||||||
|
|
||||||
for (IndexShard shard : availableShards()) {
|
for (IndexShard shard : availableShards()) {
|
||||||
|
@ -333,6 +331,9 @@ public class IndexingMemoryController extends AbstractLifecycleComponent<Indexin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("now write some indexing buffers: total indexing heap bytes used [{}] vs {} [{}], currently writing bytes [{}], [{}] shards with non-zero indexing buffer",
|
||||||
|
new ByteSizeValue(totalBytesUsed), INDEX_BUFFER_SIZE_SETTING, indexingBuffer, new ByteSizeValue(totalBytesWriting), queue.size());
|
||||||
|
|
||||||
while (totalBytesUsed > indexingBuffer.bytes() && queue.isEmpty() == false) {
|
while (totalBytesUsed > indexingBuffer.bytes() && queue.isEmpty() == false) {
|
||||||
ShardAndBytesUsed largest = queue.poll();
|
ShardAndBytesUsed largest = queue.poll();
|
||||||
logger.debug("write indexing buffer to disk for shard [{}] to free up its [{}] indexing buffer", largest.shard.shardId(), new ByteSizeValue(largest.bytesUsed));
|
logger.debug("write indexing buffer to disk for shard [{}] to free up its [{}] indexing buffer", largest.shard.shardId(), new ByteSizeValue(largest.bytesUsed));
|
||||||
|
|
Loading…
Reference in New Issue