dengziming commented on code in PR #12050:
URL: https://github.com/apache/kafka/pull/12050#discussion_r851713129


##########
core/src/main/scala/kafka/server/BrokerMetadataCheckpoint.scala:
##########
@@ -102,11 +112,16 @@ class RawMetaProperties(val props: Properties = new 
Properties()) {
 }
 
 object MetaProperties {
+  def apply(clusterId: String, nodeId: Int): MetaProperties = {
+    MetaProperties(clusterId, nodeId, MetadataVersion.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(MetadataVersion.stable().version())

Review Comment:
   Should this be MetadataVersion.V1? is this the case of the metadata version 
before 3.2.0?



##########
core/src/test/java/kafka/test/junit/ZkClusterInvocationContext.java:
##########
@@ -237,6 +239,15 @@ public SocketServer anyControllerSocketServer() {
                 .orElseThrow(() -> new RuntimeException("No broker 
SocketServers found"));
         }
 
+        @Override
+        public Map<Integer, BrokerFeatures> brokerFeatures() {
+            return servers().collect(Collectors.toMap(
+                brokerServer -> brokerServer.config().nodeId(),
+                KafkaServer::brokerFeatures
+            ));
+        }
+

Review Comment:
   nit: redundant inline



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