chia7712 commented on a change in pull request #9827: URL: https://github.com/apache/kafka/pull/9827#discussion_r552859783
########## File path: core/src/main/scala/kafka/log/ProducerStateManager.scala ########## @@ -219,8 +219,8 @@ private[log] class ProducerAppendInfo(val topicPartition: TopicPartition, if (producerEpoch != updatedEntry.producerEpoch) { if (appendFirstSeq != 0) { if (updatedEntry.producerEpoch != RecordBatch.NO_PRODUCER_EPOCH) { - throw new OutOfOrderSequenceException(s"Invalid sequence number for new epoch at offset $offset in " + - s"partition $topicPartition: $producerEpoch (request epoch), $appendFirstSeq (seq. number)") + throw new OutOfOrderSequenceException(s"Invalid sequence number for new epoch of producer $producerId " + Review comment: It seems to me ```updatedEntry.producerEpoch``` is also useful for this error. ########## File path: core/src/main/scala/kafka/log/ProducerStateManager.scala ########## @@ -201,8 +201,8 @@ private[log] class ProducerAppendInfo(val topicPartition: TopicPartition, private def checkProducerEpoch(producerEpoch: Short, offset: Long): Unit = { if (producerEpoch < updatedEntry.producerEpoch) { - val message = s"Producer's epoch at offset $offset in $topicPartition is $producerEpoch, which is " + - s"smaller than the last seen epoch ${updatedEntry.producerEpoch}" + val message = s"Epoch of producer $producerId at offset $offset in $topicPartition is $producerEpoch," + + s"which is smaller than the last seen epoch ${updatedEntry.producerEpoch}" Review comment: it needs a space. ---------------------------------------------------------------- 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