junrao commented on code in PR #16130:
URL: https://github.com/apache/kafka/pull/16130#discussion_r1621034615


##########
server-common/src/main/java/org/apache/kafka/server/common/Features.java:
##########
@@ -76,16 +76,21 @@ public short latestProduction() {
         return defaultValue(MetadataVersion.LATEST_PRODUCTION);
     }
 
+    public short latestTesting() {
+        return featureVersions[featureVersions.length - 1].featureLevel();
+    }
+
     /**
      * Creates a FeatureVersion from a level.
      *
      * @param level   the level of the feature
      * @return       the FeatureVersionUtils.FeatureVersion for the feature 
the enum is based on.
      * @throws        IllegalArgumentException if the feature is not known.
      */
-    public FeatureVersion fromFeatureLevel(short level) {
+    public FeatureVersion fromFeatureLevel(short level,
+                                           boolean 
allowUnstableFeatureVersions) {

Review Comment:
   Could we add the new param to javadoc?



##########
core/src/test/scala/unit/kafka/tools/StorageToolTest.scala:
##########
@@ -354,6 +354,7 @@ Found problem:
         MetadataVersion.LATEST_PRODUCTION,
         Map(TestFeatureVersion.FEATURE_NAME -> featureLevel),
         allFeatures,
+        false,

Review Comment:
   Hmm, TEST_VERSION level 2 is not in production and should show an exception 
when calling `StorageTool.generateFeatureRecord`?



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