rreddy-22 commented on code in PR #17698:
URL: https://github.com/apache/kafka/pull/17698#discussion_r1829850579


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -373,15 +373,21 @@ public synchronized TransactionalRequestResult 
sendOffsetsToTransaction(final Ma
                 "(currentState= " + currentState + ")");
         }
 
-        log.debug("Begin adding offsets {} for consumer group {} to 
transaction", offsets, groupMetadata);
-        AddOffsetsToTxnRequest.Builder builder = new 
AddOffsetsToTxnRequest.Builder(
-            new AddOffsetsToTxnRequestData()
-                .setTransactionalId(transactionalId)
-                .setProducerId(producerIdAndEpoch.producerId)
-                .setProducerEpoch(producerIdAndEpoch.epoch)
-                .setGroupId(groupMetadata.groupId())
-        );
-        AddOffsetsToTxnHandler handler = new AddOffsetsToTxnHandler(builder, 
offsets, groupMetadata);
+        TxnRequestHandler handler;

Review Comment:
   nit: can we add some comments explaining the difference in behavior between 
v1 and v2



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