artemlivshits commented on code in PR #17849:
URL: https://github.com/apache/kafka/pull/17849#discussion_r1848951501


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -760,8 +760,8 @@ synchronized void maybeResolveSequences() {
                         // For the transactional producer, we bump the epoch 
if possible, otherwise we transition to a fatal error
                         String unackedMessagesErr = "The client hasn't 
received acknowledgment for some previously " +
                                 "sent messages and can no longer retry them. ";
-                        if (canBumpEpoch()) {
-                            epochBumpRequired = true;
+                        if (canTriggerEpochBump()) {

Review Comment:
   Looks like here we'll go into the fatal error state if transaction protocol 
v2 is used.



##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -545,7 +545,7 @@ private void resetSequenceNumbers() {
     }
 
     synchronized void requestEpochBumpForPartition(TopicPartition tp) {
-        epochBumpRequired = true;
+        epochBumpTriggerRequired = true;

Review Comment:
   As far as I can see this function is only called for idempotent 
(non-transactional) producers.  Can we rename the function to something like 
`requestIdepmpotentEpochBumpForPartition`?



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