jolshan commented on a change in pull request #10282: URL: https://github.com/apache/kafka/pull/10282#discussion_r596248900
########## File path: core/src/main/scala/kafka/server/ReplicaManager.scala ########## @@ -1369,7 +1377,11 @@ class ReplicaManager(val config: KafkaConfig, val requestLeaderEpoch = partitionState.leaderEpoch val requestTopicId = topicIds.get(topicPartition.topic) - if (!partition.checkOrSetTopicId(requestTopicId)) { + val (topicIdOpt, partitionLogOpt) = partition.topicIdAndLog + if (!checkTopicId(requestTopicId, topicIdOpt, partitionLogOpt)) { Review comment: This is also in the case of restarting the broker. ########## File path: core/src/main/scala/kafka/server/ReplicaManager.scala ########## @@ -1369,7 +1377,11 @@ class ReplicaManager(val config: KafkaConfig, val requestLeaderEpoch = partitionState.leaderEpoch val requestTopicId = topicIds.get(topicPartition.topic) - if (!partition.checkOrSetTopicId(requestTopicId)) { + val (topicIdOpt, partitionLogOpt) = partition.topicIdAndLog + if (!checkTopicId(requestTopicId, topicIdOpt, partitionLogOpt)) { Review comment: This is also in the case of restarting the broker, as the log is not yet associated to partition. ---------------------------------------------------------------- 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