dajac commented on code in PR #12071: URL: https://github.com/apache/kafka/pull/12071#discussion_r855453938
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -251,8 +251,9 @@ class Partition(val topicPartition: TopicPartition, // lock to prevent the follower replica log update while checking if the log dir could be replaced with future log. private val futureLogLock = new Object() - private var zkVersion: Int = LeaderAndIsr.initialZKVersion - @volatile private var leaderEpoch: Int = LeaderAndIsr.initialLeaderEpoch - 1 + // The current epoch for the partition for KRaft controllers. The current ZK version for the legacy controllers. + private var partitionEpoch: Int = LeaderAndIsr.InitialPartitionEpoch Review Comment: Yeah, that makes sense. I will make it volatile for now. I have filled https://issues.apache.org/jira/browse/KAFKA-13844 for the refactor. I will take care of this as a follow up. -- 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