Logging in shard state action
This commit adds a trace log on a cluster state update while waiting for a new master, and changes the log level on cluster service close to the warn level.
This commit is contained in:
parent
efb142613f
commit
fe39d11c55
|
@ -137,12 +137,15 @@ public class ShardStateAction extends AbstractComponent {
|
|||
observer.waitForNextChange(new ClusterStateObserver.Listener() {
|
||||
@Override
|
||||
public void onNewClusterState(ClusterState state) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("new cluster state [{}] after waiting for master election to fail shard [{}]", shardRoutingEntry.getShardRouting().shardId(), state.prettyPrint(), shardRoutingEntry);
|
||||
}
|
||||
sendShardFailed(observer, shardRoutingEntry, listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClusterServiceClose() {
|
||||
logger.error("{} node closed while handling failed shard [{}]", shardRoutingEntry.failure, shardRoutingEntry.getShardRouting().getId(), shardRoutingEntry.getShardRouting());
|
||||
logger.warn("{} node closed while handling failed shard [{}]", shardRoutingEntry.failure, shardRoutingEntry.getShardRouting().getId(), shardRoutingEntry.getShardRouting());
|
||||
listener.onShardFailedFailure(new NodeClosedException(clusterService.localNode()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue