jolshan commented on code in PR #19714:
URL: https://github.com/apache/kafka/pull/19714#discussion_r2112409709


##########
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java:
##########
@@ -884,6 +884,40 @@ public void abortTransaction() throws 
ProducerFencedException {
         producerMetrics.recordAbortTxn(time.nanoseconds() - abortStart);
     }
 
+    /**
+     * Completes a prepared transaction by comparing the provided prepared 
transaction state with the
+     * current prepared state on the producer.
+     * If they match, the transaction is committed; otherwise, it is aborted.
+     * 
+     * @param preparedTxnState              The prepared transaction state to 
compare against the current state
+     * @throws IllegalStateException if the producer is not in prepared 
transaction state

Review Comment:
   what is the difference between IlegalState and InvalidTxnState?



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