kirktrue commented on code in PR #12149:
URL: https://github.com/apache/kafka/pull/12149#discussion_r1003656846


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -996,20 +1010,21 @@ private void ensureTransactional() {
     }
 
     private void maybeFailWithError() {

Review Comment:
   Are there any functional changes in `maybeFailWithError`, or is it just to 
refactor for an early return?



##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java:
##########
@@ -300,9 +301,13 @@ void runOnce() {
             try {
                 transactionManager.maybeResolveSequences();
 
+                RuntimeException lastError = transactionManager.lastError();
+                if (transactionManager.hasAbortableError() && 
shouldHandleAuthorizationError(lastError)) {
+                    return;

Review Comment:
   In the new code we return in the case of a `ClusterAuthorizationException`. 
Per the comments later on in the `runOnce` method, do we still want to call the 
`bumpIdempotentEpochAndResetIdIfNeeded()` method in this case?



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to