-
Notifications
You must be signed in to change notification settings - Fork 14.8k
KAFKA-19990: gracefully handle exceptions when handling AllocateProducerIdsResponse #21135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
|
Thanks @gaurav-narula for the fix, It looks okay for me let's wait for the pipeline to finish first |
chia7712
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaurav-narula thanks for this patch
...coordinator/src/main/java/org/apache/kafka/coordinator/transaction/RPCProducerIdManager.java
Outdated
Show resolved
Hide resolved
...coordinator/src/main/java/org/apache/kafka/coordinator/transaction/RPCProducerIdManager.java
Outdated
Show resolved
Hide resolved
...coordinator/src/main/java/org/apache/kafka/coordinator/transaction/RPCProducerIdManager.java
Outdated
Show resolved
Hide resolved
…cerIdsResponse The handler in `RPCProducerIdManager` doesn't handle authentication exception and version mismatch exceptions gracefully. This change ensures we retry on such failures and adds unit tests for these scenarios.
|
@gaurav-narula could you please file the patch to 3.9 in addition to trunk? |
0a42920 to
d00273f
Compare
|
|
||
| private final int brokerId; | ||
| private final Time time; | ||
| protected final Time time; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: package-private is sufficient here
| } | ||
|
|
||
| protected void handleAllocateProducerIdsResponse(AllocateProducerIdsResponse response) { | ||
| protected void handleUnsuccessfulResponse() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: private should suffice
The handler in
RPCProducerIdManagerdoesn't handle authenticationexception and version mismatch exceptions gracefully.
This change ensures we retry on such failures and adds unit tests for
these scenarios.