mumrah commented on a change in pull request #11677: URL: https://github.com/apache/kafka/pull/11677#discussion_r784224825
########## File path: core/src/main/scala/kafka/server/BrokerMetadataCheckpoint.scala ########## @@ -94,11 +103,16 @@ class RawMetaProperties(val props: Properties = new Properties()) { } object MetaProperties { + def apply(clusterId: String, nodeId: Int): MetaProperties = { + MetaProperties(clusterId, nodeId, MetadataVersions.latest().version()) + } + def parse(properties: RawMetaProperties): MetaProperties = { properties.requireVersion(expectedVersion = 1) val clusterId = require(ClusterIdKey, properties.clusterId) val nodeId = require(NodeIdKey, properties.nodeId) - new MetaProperties(clusterId, nodeId) + val metadataVersion = properties.initialMetadataVersion.getOrElse(MetadataVersions.V1.version()) Review comment: If `meta.properties` does not have `initial.metadata.version` set (as would be the case with KRaft preview), we treat it as V1 -- 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