jolshan commented on code in PR #16840:
URL: https://github.com/apache/kafka/pull/16840#discussion_r1725390489


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -980,6 +1002,28 @@ void handleCoordinatorReady() {
                 null;
         this.coordinatorSupportsBumpingEpoch = initProducerIdVersion != null &&
                 initProducerIdVersion.maxVersion() >= 3;
+
+        if (nodeApiVersions == null) return;
+
+        if (nodeApiVersions.finalizedFeatures() != null) {
+            /*
+                To enable the transaction V2, it requires:
+                1. transaction.version finalized version >= 2
+                2. The ProduceRequest max version > 
ProducerRequest.LAST_BEFORE_TRANSACTION_V2_VERSION

Review Comment:
   I guess we can assume that if the tv is 2 and it is the latest epoch on any 
broker in the cluster, then the cluster should support these apis. (We have to 
make tv 2 stable after these are available, but that can be done)



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