ijuma commented on code in PR #18845:
URL: https://github.com/apache/kafka/pull/18845#discussion_r1950206038


##########
server-common/src/main/java/org/apache/kafka/server/common/Feature.java:
##########
@@ -155,18 +155,16 @@ public FeatureVersion fromFeatureLevel(short level,
      * For example, say feature X level x relies on feature Y level y:
      * if feature X >= x then throw an error if feature Y < y.
      *
-     * All feature levels above 0 in kraft require metadata.version=4 
(IBP_3_3_IV0) in order to write the feature records to the cluster.
-     *
      * @param feature                   the feature we are validating
      * @param features                  the feature versions we have (or want 
to set)
      * @throws IllegalArgumentException if the feature is not valid
      */
     public static void validateVersion(FeatureVersion feature, Map<String, 
Short> features) {
         Short metadataVersion = features.get(MetadataVersion.FEATURE_NAME);
 
-        if (feature.featureLevel() >= 1 && (metadataVersion == null || 
metadataVersion < MetadataVersion.IBP_3_3_IV0.featureLevel()))
+        if (feature.featureLevel() >= 1 && (metadataVersion == null || 
metadataVersion < MetadataVersion.MINIMUM_VERSION.featureLevel()))

Review Comment:
   Since we are not actually using `MetadataVersion` here, it seems possible 
for callers to pass invalid values. That is why I kept the validation.



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