urbandan commented on code in PR #13591:
URL: https://github.com/apache/kafka/pull/13591#discussion_r1205410637


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -609,14 +686,15 @@ public synchronized void 
handleCompletedBatch(ProducerBatch batch, ProduceRespon
     }
 
     public synchronized void transitionToUninitialized(RuntimeException 
exception) {
-        transitionTo(State.UNINITIALIZED);
+        transitionTo(State.UNINITIALIZED, exception, 
InvalidStateDetectionStrategy.BACKGROUND);

Review Comment:
   What will happen with the exception we pass to transitionTo here?
   My understanding is that transitionTo only cares about the exception if the 
state is one of the error states.



##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -609,14 +686,15 @@ public synchronized void 
handleCompletedBatch(ProducerBatch batch, ProduceRespon
     }
 
     public synchronized void transitionToUninitialized(RuntimeException 
exception) {
-        transitionTo(State.UNINITIALIZED);
+        transitionTo(State.UNINITIALIZED, exception, 
InvalidStateDetectionStrategy.BACKGROUND);
         if (pendingTransition != null) {
             pendingTransition.result.fail(exception);
         }
         lastError = null;
     }
 
-    public synchronized void maybeTransitionToErrorState(RuntimeException 
exception) {
+    public synchronized void maybeTransitionToErrorState(RuntimeException 
exception,

Review Comment:
   Just to double check: the transitionToFatalError call on line 702 does not 
use the invalidStateDetectionStrategy param because all of the exceptions in 
the condition come from a server response, thus making it a BACKGROUND type 
call?



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