You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/01/05 17:08:23 UTC
[GitHub] [kafka] dajac opened a new pull request #9827: MINOR; Add producer id in exceptions thrown by ProducerStateManager
dajac opened a new pull request #9827:
URL: https://github.com/apache/kafka/pull/9827
This patch adds producer id in exceptions thrown by the `ProducerStateManager`. It was already there in some cases but was not in others. This is really helpful to have when troubleshooting. Otherwise, it is not possible to correlate broker's logs with producer's logs.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [kafka] dajac merged pull request #9827: MINOR; Add producer id in exceptions thrown by ProducerStateManager
Posted by GitBox <gi...@apache.org>.
dajac merged pull request #9827:
URL: https://github.com/apache/kafka/pull/9827
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [kafka] dajac merged pull request #9827: MINOR; Add producer id in exceptions thrown by ProducerStateManager
Posted by GitBox <gi...@apache.org>.
dajac merged pull request #9827:
URL: https://github.com/apache/kafka/pull/9827
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [kafka] dajac commented on pull request #9827: MINOR; Add producer id in exceptions thrown by ProducerStateManager
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #9827:
URL: https://github.com/apache/kafka/pull/9827#issuecomment-756041472
@chia7712 Thanks for your comments. I have addressed them. Could you take another look at the PR?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #9827: MINOR; Add producer id in exceptions thrown by ProducerStateManager
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org