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


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -1292,8 +1292,13 @@ public void handleResponse(AbstractResponse response) {
                 reenqueue();
             } else if (error == Errors.COORDINATOR_LOAD_IN_PROGRESS || error 
== Errors.CONCURRENT_TRANSACTIONS) {
                 reenqueue();
-            } else if (error == Errors.TRANSACTIONAL_ID_AUTHORIZATION_FAILED ||
-                    error == Errors.CLUSTER_AUTHORIZATION_FAILED) {
+            } else if (error == Errors.CLUSTER_AUTHORIZATION_FAILED) {
+                log.error("Cluster authorization failure, transition the 
producer state back to uninitialized");
+                fail(error.exception());
+                // transition back to uninitialized state to enable client 
side retry
+                transitionTo(State.READY);

Review Comment:
   Could we update `isTransitionValid` to allow transitions from INITIALIZING 
to UNINITIALIZED?



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