ahuang98 commented on code in PR #12050: URL: https://github.com/apache/kafka/pull/12050#discussion_r869715273
########## core/src/main/scala/kafka/tools/StorageTool.scala: ########## @@ -70,13 +47,17 @@ object StorageTool extends Logging { case "format" => val directories = configToLogDirectories(config.get) val clusterId = namespace.getString("cluster_id") + val metadataVersion = getMetadataVersion(namespace) + if (metadataVersion.isLessThan(MetadataVersion.IBP_3_0_IV0)) { + throw new TerseFailure(s"Cannot specify a metadata version less than ${MetadataVersion.IBP_3_0_IV0.featureLevel()}.") Review Comment: nit: Create a `MetadataVersion.isKRaftSupported()` / `MetadataVersion.firstKRaftMetadataVersion()` method? You could use it in https://github.com/apache/kafka/pull/12050/files#diff-2ee48010b1035f21f5ebdd47a78fc632ed239179aee77e66d75a6bdb77ee8fd7R147 and https://github.com/apache/kafka/pull/12050/files#diff-602affccc2af320d6cdfda31afc197bf1a798497009c404706a600ab57c1bea5R78 to name a few places. -- 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