You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dajac (via GitHub)" <gi...@apache.org> on 2023/05/24 14:45:57 UTC

[GitHub] [kafka] dajac commented on a diff in pull request #13753: MINOR: Log previous leader when replica transitions from leader to follower or vice versa

dajac commented on code in PR #13753:
URL: https://github.com/apache/kafka/pull/13753#discussion_r1204298139


##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -726,7 +726,7 @@ class Partition(val topicPartition: TopicPartition,
           s"with partition epoch ${partitionState.partitionEpoch}, high watermark ${leaderLog.highWatermark}, " +
           s"ISR ${isr.mkString("[", ",", "]")}, adding replicas ${addingReplicas.mkString("[", ",", "]")} and " +
           s"removing replicas ${removingReplicas.mkString("[", ",", "]")} ${if (isUnderMinIsr) "(under-min-isr)" else ""}. " +
-          s"Previous leader epoch was $leaderEpoch.")
+          s"Previous leader $leaderReplicaIdOpt and previous leader epoch was $leaderEpoch.")

Review Comment:
   It will printed out as `None` when not defined. I thought that it is good enough but I can change it if you feel strong about this.



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org