Add node name to decider trace logging (#20437)
Adds the entire DiscoveryNode object to the trace log in AllocationDeciders. The allocation decider logging at TRACE level can sometimes be helpful to determine why a shard is not getting allocated on specific nodes. Currently, we only log the node id for these messages. It will be helpful to also include the node name (esp. when dealing with a lot of nodes in the cluster).
This commit is contained in:
parent
567093cf78
commit
1ae8d6123f
|
@ -74,7 +74,7 @@ public class AllocationDeciders extends AllocationDecider {
|
|||
// short track if a NO is returned.
|
||||
if (decision == Decision.NO) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Can not allocate [{}] on node [{}] due to [{}]", shardRouting, node.nodeId(), allocationDecider.getClass().getSimpleName());
|
||||
logger.trace("Can not allocate [{}] on node [{}] due to [{}]", shardRouting, node.node(), allocationDecider.getClass().getSimpleName());
|
||||
}
|
||||
// short circuit only if debugging is not enabled
|
||||
if (!allocation.debugDecision()) {
|
||||
|
|
Loading…
Reference in New Issue