jolshan commented on a change in pull request #10143: URL: https://github.com/apache/kafka/pull/10143#discussion_r578577789
########## File path: core/src/main/scala/kafka/server/ReplicaManager.scala ########## @@ -1364,11 +1364,19 @@ class ReplicaManager(val config: KafkaConfig, Some(partition) } - // Next check partition's leader epoch + // Next check the topic ID and the partition's leader epoch partitionOpt.foreach { partition => val currentLeaderEpoch = partition.getLeaderEpoch val requestLeaderEpoch = partitionState.leaderEpoch - if (requestLeaderEpoch > currentLeaderEpoch) { + val requestTopicId = topicIds.get(topicPartition.topic) + val (consistentTopicId, logTopicId) = partition.checkOrSetTopicId(requestTopicId) Review comment: Good point. I didn't realize it had access. ---------------------------------------------------------------- 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