Minor logging improvements (#38084)
Fixes some log messages that caused some minor confusion when digging through a log generated by a failing test.
This commit is contained in:
parent
e066a59c89
commit
7f738e8541
|
@ -557,8 +557,13 @@ public class Coordinator extends AbstractLifecycleComponent implements Discovery
|
|||
assert Thread.holdsLock(mutex) : "Coordinator mutex not held";
|
||||
assert leaderNode.isMasterNode() : leaderNode + " became a leader but is not master-eligible";
|
||||
|
||||
logger.debug("{}: coordinator becoming FOLLOWER of [{}] in term {} (was {}, lastKnownLeader was [{}])",
|
||||
method, leaderNode, getCurrentTerm(), mode, lastKnownLeader);
|
||||
if (mode == Mode.FOLLOWER && Optional.of(leaderNode).equals(lastKnownLeader)) {
|
||||
logger.trace("{}: coordinator remaining FOLLOWER of [{}] in term {}",
|
||||
method, leaderNode, getCurrentTerm());
|
||||
} else {
|
||||
logger.debug("{}: coordinator becoming FOLLOWER of [{}] in term {} (was {}, lastKnownLeader was [{}])",
|
||||
method, leaderNode, getCurrentTerm(), mode, lastKnownLeader);
|
||||
}
|
||||
|
||||
final boolean restartLeaderChecker = (mode == Mode.FOLLOWER && Optional.of(leaderNode).equals(lastKnownLeader)) == false;
|
||||
|
||||
|
|
|
@ -374,9 +374,10 @@ public class FollowersChecker {
|
|||
public void run() {
|
||||
synchronized (mutex) {
|
||||
if (running() == false) {
|
||||
logger.debug("{} condition no longer applies, not marking faulty", discoveryNode);
|
||||
logger.trace("{} no longer running, not marking faulty", FollowerChecker.this);
|
||||
return;
|
||||
}
|
||||
logger.debug("{} marking node as faulty", FollowerChecker.this);
|
||||
faultyNodes.add(discoveryNode);
|
||||
followerCheckers.remove(discoveryNode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue