dajac commented on code in PR #14047:
URL: https://github.com/apache/kafka/pull/14047#discussion_r1269152813


##########
server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java:
##########
@@ -386,6 +386,18 @@ public short groupMetadataValueVersion() {
         }
     }
 
+    public short offsetCommitValueVersion() {
+        if (isLessThan(MetadataVersion.IBP_2_1_IV0)) {
+            return 1;
+        } else if (isLessThan(MetadataVersion.IBP_2_1_IV1)) {
+            return 2;
+        } else {
+            // Serialize with the highest supported non-flexible version
+            // until a tagged field is introduced or the version is bumped.
+            return  3;
+        }

Review Comment:
   > > // Serialize with the highest supported non-flexible version
   > > // until a tagged field is introduced or the version is bumped.
   > 
   > This comment confused me a bit. Do we plan to manually update this method 
when new versions come in? Why is there a callout for flexible versions?
   
   This is related to 
https://cwiki.apache.org/confluence/display/KAFKA/KIP-915%3A+Txn+and+Group+Coordinator+Downgrade+Foundation.
 Basically, we have already introduced the version 4 of this record to support 
tagged fields that may be added in the future. However, we don't want to use 
version 4 yet.
   
   When a new version is released or tagged fields are added, we will change 
the logic here to use the correct version based on the metadata version.



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