Merge pull request #15259 from jasontedor/shard-inactive-logging
Simplify shard inactive logging
This commit is contained in:
commit
b538343f61
|
@ -1034,7 +1034,7 @@ public class IndexShard extends AbstractIndexShardComponent {
|
||||||
boolean wasActive = active.getAndSet(false);
|
boolean wasActive = active.getAndSet(false);
|
||||||
if (wasActive) {
|
if (wasActive) {
|
||||||
updateBufferSize(IndexingMemoryController.INACTIVE_SHARD_INDEXING_BUFFER, IndexingMemoryController.INACTIVE_SHARD_TRANSLOG_BUFFER);
|
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);
|
indexEventListener.onShardInactive(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
// 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...
|
// get the same indexing buffer as large indices. But it quickly gets tricky...
|
||||||
if (activeShardCount == 0) {
|
if (activeShardCount == 0) {
|
||||||
logger.debug("no active shards");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,13 +291,7 @@ public class IndexingMemoryController extends AbstractLifecycleComponent<Indexin
|
||||||
*/
|
*/
|
||||||
protected boolean checkIdle(IndexShard shard) {
|
protected boolean checkIdle(IndexShard shard) {
|
||||||
try {
|
try {
|
||||||
boolean idle = shard.checkIdle();
|
return shard.checkIdle();
|
||||||
if (idle && logger.isDebugEnabled()) {
|
|
||||||
logger.debug("marking shard {} as inactive (inactive_time[{}]) indexing wise",
|
|
||||||
shard.shardId(),
|
|
||||||
shard.getInactiveTime());
|
|
||||||
}
|
|
||||||
return idle;
|
|
||||||
} catch (EngineClosedException | FlushNotAllowedEngineException e) {
|
} catch (EngineClosedException | FlushNotAllowedEngineException e) {
|
||||||
logger.trace("ignore [{}] while marking shard {} as inactive", e.getClass().getSimpleName(), shard.shardId());
|
logger.trace("ignore [{}] while marking shard {} as inactive", e.getClass().getSimpleName(), shard.shardId());
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue