dajac commented on code in PR #12506: URL: https://github.com/apache/kafka/pull/12506#discussion_r943741675
########## core/src/main/scala/kafka/controller/KafkaController.scala: ########## @@ -2336,7 +2336,14 @@ class KafkaController(val config: KafkaConfig, controllerContext.partitionLeadershipInfo(tp) match { case Some(leaderIsrAndControllerEpoch) => val currentLeaderAndIsr = leaderIsrAndControllerEpoch.leaderAndIsr - if (newLeaderAndIsr.leaderEpoch != currentLeaderAndIsr.leaderEpoch) { + if (newLeaderAndIsr.partitionEpoch > currentLeaderAndIsr.partitionEpoch + || newLeaderAndIsr.leaderEpoch > currentLeaderAndIsr.leaderEpoch) { Review Comment: nit: Should we align this line on « newLeader… »? -- 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