KAFKA-9310: Handle UnknownProducerId from RecordCollector.send - #7845
Merged
vvcephei merged 2 commits intoDec 21, 2019
Conversation
Contributor
Author
|
@mjsax , do you have a chance to look at this small fix? |
Member
|
Checkstyle: |
mjsax
reviewed
Dec 17, 2019
| } | ||
|
|
||
| @SuppressWarnings("unchecked") | ||
| @Test(expected = RecoverableClientException.class) |
Member
There was a problem hiding this comment.
we should avoid to use this construct but use assertThrows() instead.
Member
There was a problem hiding this comment.
Should we also verify the root cause?
mjsax
reviewed
Dec 17, 2019
| } | ||
|
|
||
| @SuppressWarnings("unchecked") | ||
| @Test(expected = RecoverableClientException.class) |
mjsax
reviewed
Dec 17, 2019
| collector.send("topic1", "3", "0", null, null, stringSerializer, stringSerializer, streamPartitioner); | ||
| } | ||
|
|
||
| @SuppressWarnings("unchecked") |
Contributor
Author
There was a problem hiding this comment.
Missing generics in the method. I fixed it.
mjsax
reviewed
Dec 17, 2019
| uncaughtException.getCause() instanceof ProducerFencedException) { | ||
| if (uncaughtException instanceof KafkaException &&( | ||
| uncaughtException.getCause() instanceof ProducerFencedException || | ||
| uncaughtException.getCause() instanceof UnknownProducerIdException |
Member
There was a problem hiding this comment.
The error message of RecoverableClientException does not match any longer... (I would recommend to not add the error name to begin with, as the root cause exception is pass into the constructor anyway)
Contributor
Author
|
Thanks for the feedback, @mjsax ! All good catches. And sorry about the checkstyle. |
vvcephei
added a commit
that referenced
this pull request
Dec 21, 2019
Reviewers: Matthias J. Sax <mjsax@apache.org>
qq619618919
pushed a commit
to qq619618919/kafka
that referenced
this pull request
May 12, 2020
…e#7845) Reviewers: Matthias J. Sax <mjsax@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow on for #7748 .
Additionally handle synchronous UnknownProducerId in RecordCollectorImpl.send , which was overlooked in the prior PR.
Committer Checklist (excluded from commit message)