jsancio commented on code in PR #15986: URL: https://github.com/apache/kafka/pull/15986#discussion_r1624701021
########## raft/src/main/java/org/apache/kafka/raft/FollowerState.java: ########## @@ -156,22 +156,24 @@ public boolean canGrantVote(ReplicaKey candidateKey, boolean isLogUpToDate) { log.debug( "Rejecting vote request from candidate ({}) since we already have a leader {} in epoch {}", candidateKey, - leaderId(), + leader, epoch ); return false; } @Override public String toString() { - return "FollowerState(" + - "fetchTimeoutMs=" + fetchTimeoutMs + - ", epoch=" + epoch + - ", leaderId=" + leaderId + - ", voters=" + voters + - ", highWatermark=" + highWatermark + - ", fetchingSnapshot=" + fetchingSnapshot + - ')'; + return String.format( Review Comment: `String.format` are easier to update and read. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org