Log when cancelling allocation of a replica because a new syncid was found
Currently the message stays in the `UnassignedInfo` for the shard, however, it would be very useful to know the exact point (time-wise) that the cancellation happened when diagnosing an issue. Relates to debugging #16357
This commit is contained in:
parent
9a9eadd743
commit
678bc927ce
|
@ -104,6 +104,8 @@ public abstract class ReplicaShardAllocator extends AbstractComponent {
|
|||
&& matchingNodes.isNodeMatchBySyncID(nodeWithHighestMatch) == true) {
|
||||
// we found a better match that has a full sync id match, the existing allocation is not fully synced
|
||||
// so we found a better one, cancel this one
|
||||
logger.debug("cancelling allocation of replica on [{}], sync id match found on node [{}]",
|
||||
currentNode, nodeWithHighestMatch);
|
||||
it.moveToUnassigned(new UnassignedInfo(UnassignedInfo.Reason.REALLOCATED_REPLICA,
|
||||
"existing allocation of replica to [" + currentNode + "] cancelled, sync id match found on node [" + nodeWithHighestMatch + "]",
|
||||
null, allocation.getCurrentNanoTime(), System.currentTimeMillis()));
|
||||
|
|
Loading…
Reference in New Issue