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


##########
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:
   I inlined the 'is stale batch' logic into `handleFailedBatch()`, so these 
issues are no longer present.



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