Merge pull request #15259 from jasontedor/shard-inactive-logging

Simplify shard inactive logging
This commit is contained in:
Jason Tedor 2015-12-05 11:30:56 -05:00
commit b538343f61
2 changed files with 2 additions and 9 deletions

View File

@ -1034,7 +1034,7 @@ public class IndexShard extends AbstractIndexShardComponent {
boolean wasActive = active.getAndSet(false);
if (wasActive) {
updateBufferSize(IndexingMemoryController.INACTIVE_SHARD_INDEXING_BUFFER, IndexingMemoryController.INACTIVE_SHARD_TRANSLOG_BUFFER);
logger.debug("shard is now inactive");
logger.debug("marking shard as inactive (inactive_time=[{}]) indexing wise", inactiveTime);
indexEventListener.onShardInactive(this);
}
}

View File

@ -254,7 +254,6 @@ public class IndexingMemoryController extends AbstractLifecycleComponent<Indexin
// is actually using (using IW.ramBytesUsed), so that small indices (e.g. Marvel) would not
// get the same indexing buffer as large indices. But it quickly gets tricky...
if (activeShardCount == 0) {
logger.debug("no active shards");
return;
}
@ -292,13 +291,7 @@ public class IndexingMemoryController extends AbstractLifecycleComponent<Indexin
*/
protected boolean checkIdle(IndexShard shard) {
try {
boolean idle = shard.checkIdle();
if (idle && logger.isDebugEnabled()) {
logger.debug("marking shard {} as inactive (inactive_time[{}]) indexing wise",
shard.shardId(),
shard.getInactiveTime());
}
return idle;
return shard.checkIdle();
} catch (EngineClosedException | FlushNotAllowedEngineException e) {
logger.trace("ignore [{}] while marking shard {} as inactive", e.getClass().getSimpleName(), shard.shardId());
return true;