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


##########
clients/src/main/java/org/apache/kafka/common/requests/TxnOffsetCommitRequest.java:
##########
@@ -93,7 +118,8 @@ public TxnOffsetCommitRequest build(short version) {
                 throw new UnsupportedVersionException("Broker doesn't support 
group metadata commit API on version " + version
                 + ", minimum supported request version is 3 which requires 
brokers to be on version 2.5 or above.");
             }
-            return new TxnOffsetCommitRequest(data, version);
+
+            return new TxnOffsetCommitRequest(data, (short) 
Math.min(desiredMaximumVersion, version));

Review Comment:
   Why do we need this for this request but not the produce request?



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