You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "kirktrue (via GitHub)" <gi...@apache.org> on 2023/06/03 01:26:35 UTC

[GitHub] [kafka] kirktrue commented on a diff in pull request #13591: KAFKA-14831: Illegal state errors should be fatal in transactional producer

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


##########
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:
   Correct. However, I went ahead and made the parameter explicit to avoid confusion.



-- 
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-unsubscribe@kafka.apache.org

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