aliehsaeedii commented on code in PR #16332:
URL: https://github.com/apache/kafka/pull/16332#discussion_r1639280799


##########
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java:
##########
@@ -792,6 +792,9 @@ public void sendOffsetsToTransaction(Map<TopicPartition, 
OffsetAndMetadata> offs
      * <p>
      * Further, if any of the {@link #send(ProducerRecord)} calls which were 
part of the transaction hit irrecoverable
      * errors, this method will throw the last received exception immediately 
and the transaction will not be committed.
+     * It should be noted that if <code>flush()</code> is called explicitly 
beforehand, this method will NOT throw any
+     * exception related to the {@link #send(ProducerRecord)} calls. Since 
<code>flush()</code> clears the last received
+     * exception and returns the transaction from the error state.

Review Comment:
   >Should it be "and transits the transaction out of any error state"
   I agree with you.



##########
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java:
##########
@@ -792,6 +792,9 @@ public void sendOffsetsToTransaction(Map<TopicPartition, 
OffsetAndMetadata> offs
      * <p>
      * Further, if any of the {@link #send(ProducerRecord)} calls which were 
part of the transaction hit irrecoverable
      * errors, this method will throw the last received exception immediately 
and the transaction will not be committed.
+     * It should be noted that if <code>flush()</code> is called explicitly 
beforehand, this method will NOT throw any
+     * exception related to the {@link #send(ProducerRecord)} calls. Since 
<code>flush()</code> clears the last received
+     * exception and returns the transaction from the error state.

Review Comment:
   >Should it be "and transits the transaction out of any error state"
   
   I agree with you.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to