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
KAFKA-5427: Transactional producer should allow FindCoordinator in error state #3297
Conversation
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
@@ -1279,16 +1345,43 @@ public void shouldNotSendAbortTxnRequestWhenOnlyAddOffsetsRequestFailed() throws | |||
|
|||
TransactionalRequestResult abortResult = transactionManager.beginAbortingTransaction(); | |||
|
|||
prepareAddOffsetsToTxnResponse(Errors.TOPIC_AUTHORIZATION_FAILED, consumerGroupId, pid, epoch); | |||
prepareAddOffsetsToTxnResponse(Errors.GROUP_AUTHORIZATION_FAILED, consumerGroupId, pid, epoch); |
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.
Why was this changed?
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.
The previous error is not expected for AddOffsets, which means it is a fatal error. The intent of the test case was apparently to trigger an abortable error. Note that I've added a test case for the fatal error case below.
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.
LGTM, barring a minor comment.
|
||
// we do not transition to ABORTABLE_ERROR since we were already aborting | ||
assertTrue(transactionManager.isAborting()); | ||
assertFalse(transactionManager.hasError()); |
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.
perhaps better to assert that transactionManager.hasAbortableError
is false.
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.
The hasError
check is strictly stronger. It covers both hasAbortableError
and hasFatalError
.
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.
LGTM
Merging to trunk and 0.11.0 |
…ror state Author: Jason Gustafson <jason@confluent.io> Reviewers: Ismael Juma <ismael@juma.me.uk>, Apurva Mehta <apurva@confluent.io>, Guozhang Wang <wangguoz@gmail.com> Closes #3297 from hachikuji/KAFKA-5427 (cherry picked from commit 43e935a) Signed-off-by: Jason Gustafson <jason@confluent.io>
No description provided.