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


##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -109,6 +111,52 @@ object StorageTool extends Logging {
     }
   }
 
+  private def validateMetadataVersion(metadataVersion: MetadataVersion, 
config: Option[KafkaConfig]): Unit = {
+    if (!metadataVersion.isKRaftSupported) {
+      throw new TerseFailure(s"Must specify a valid KRaft metadata.version of 
at least ${MetadataVersion.IBP_3_0_IV0}.")
+    }
+    if (!metadataVersion.isProduction) {
+      if (config.get.unstableMetadataVersionsEnabled) {
+        System.out.println(s"WARNING: using pre-production metadata.version 
$metadataVersion.")
+      } else {
+        throw new TerseFailure(s"The metadata.version $metadataVersion is not 
ready for production use yet.")
+      }
+    }
+  }
+
+  private[tools] def generateFeatureRecords(metadataRecords: 
ArrayBuffer[ApiMessageAndVersion],
+                                            metadataVersion: MetadataVersion,
+                                            specifiedFeatures: Map[String, 
java.lang.Short],
+                                            allFeatures: List[Features],
+                                            usesVersionDefault: Boolean): Unit 
= {
+    // If we are using --version-default, the default is based on the metadata 
version.
+    val metadataVersionForDefault = if (usesVersionDefault) 
Optional.of(metadataVersion) else Optional.empty[MetadataVersion]()

Review Comment:
   Ok -- so if I understand correctly, the request is to remove latest 
production per feature and to simply mark as production ready if the MV that 
corresponds to it is production ready?
   
   The only case where this is tricky is when we use the --feature flag and we 
need to find the latest production version. To do that, we will need to get the 
latest production Metadata and map that to a feature. It's doable though, so I 
can proceed with that.
   
   As for
   >If we follow the protocol of creating a new MV for each new feature and 
making them production ready at the same time then the answer to your question 
is yes.
   
   Originally this did not need to be a production ready MV even if the feature 
is production, but I think we are now flipping this around and saying the 
feature is production ready iff the MV is production ready.



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