rreddy-22 commented on code in PR #20039:
URL: https://github.com/apache/kafka/pull/20039#discussion_r2181020864


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -1500,8 +1500,21 @@ public void handleResponse(AbstractResponse response) {
                 ProducerIdAndEpoch producerIdAndEpoch = new 
ProducerIdAndEpoch(initProducerIdResponse.data().producerId(),
                         initProducerIdResponse.data().producerEpoch());
                 setProducerIdAndEpoch(producerIdAndEpoch);
-                // TO_DO Add code to handle transition to prepared_txn when 
keepPrepared = true
-                transitionTo(State.READY);
+                // If this is a 2PC-enabled transaction with 
keepPreparedTxn=true, transition directly
+                // to PREPARED_TRANSACTION state IFF there is an ongoing 
transaction.
+                if (enable2PC &&

Review Comment:
   Yes, I'm aware that it's allowed, just wanted to confirm the transitions!



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