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


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -772,6 +779,14 @@ synchronized void handleFailedBatch(ProducerBatch batch, 
RuntimeException except
         }
     }
 
+    /**
+     * Returns {@code true} if the given {@link ProducerBatch} has the same 
producer ID but a different epoch than the
+     * {@link #producerIdAndEpoch cached producer ID and epoch}.
+     */
+    synchronized boolean isStaleBatch(ProducerBatch batch) {

Review Comment:
   > Does this method need to by `synchronized`?
   
   No, not at present.
   
   > Also seems it could be `private`?
   
   Yes, it could. I might even just inline it in `handleFailedBatch()` to 
simplify things.



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