zhaohaidao commented on a change in pull request #9311: URL: https://github.com/apache/kafka/pull/9311#discussion_r502744351
########## File path: core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala ########## @@ -381,9 +386,16 @@ class TransactionCoordinator(brokerId: Int, if (txnMetadata.producerId != producerId) Left(Errors.INVALID_PRODUCER_ID_MAPPING) // Strict equality is enforced on the client side requests, as they shouldn't bump the producer epoch. - else if ((isFromClient && producerEpoch != txnMetadata.producerEpoch) || producerEpoch < txnMetadata.producerEpoch) + else if (isFromClient && producerEpoch != txnMetadata.producerEpoch) { + if (producerEpoch == txnMetadata.lastProducerEpoch) { Review comment: Thanks for your adivce. I have create an issue to track this follow-up: https://issues.apache.org/jira/projects/KAFKA/issues/KAFKA-10596?filter=allissues# ---------------------------------------------------------------- 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