mumrah commented on a change in pull request #9100:
URL: https://github.com/apache/kafka/pull/9100#discussion_r489756083



##########
File path: core/src/main/scala/kafka/server/ReplicaManager.scala
##########
@@ -1317,7 +1326,9 @@ class ReplicaManager(val config: KafkaConfig,
             partitionOpt.foreach { partition =>
               val currentLeaderEpoch = partition.getLeaderEpoch
               val requestLeaderEpoch = partitionState.leaderEpoch
-              if (requestLeaderEpoch > currentLeaderEpoch) {
+              val currentZkVersion = partition.getZkVersion
+              val requestZkVersion = partitionState.zkVersion
+              if (requestLeaderEpoch > currentLeaderEpoch || requestZkVersion 
> currentZkVersion) {

Review comment:
       No, we don't need this anymore. This was added so a LeaderAndIsr could 
update the Partition state without a leader epoch bump, but we don't have that 
flow anymore so we can revert 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.

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


Reply via email to