mimaison commented on code in PR #15834:
URL: https://github.com/apache/kafka/pull/15834#discussion_r1622351252


##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -1457,6 +1465,18 @@ class KafkaConfig private(doLog: Boolean, val props: 
java.util.Map[_, _], dynami
     }
   }
 
+  /**
+   * Validate some configurations for new MetadataVersion. A new 
MetadataVersion can take place when
+   * a FeatureLevelRecord for "metadata.version" is read from the cluster 
metadata.
+   */
+  def validateWithMetadataVersion(metadataVersion: MetadataVersion): Unit = {

Review Comment:
   This seems to be the exact same check we do in `validateValues()`. Can we 
consolidate both?



##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -1360,6 +1360,14 @@ class KafkaConfig private(doLog: Boolean, val props: 
java.util.Map[_, _], dynami
       }
       validateAdvertisedListenersNonEmptyForBroker()
     }
+    if (processRoles.contains(ProcessRole.BrokerRole)
+      && 
originals.containsKey(ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG)
+      && logDirs.size > 1) {
+        require(interBrokerProtocolVersion.isDirectoryAssignmentSupported,
+          s"Multiple log directories (aka JBOD) are not supported in the 
configured " +
+            s"${ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG} 
${interBrokerProtocolVersion}. " +

Review Comment:
   Should we add `ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG` 
after the value? So the message looks like `Multiple log directories (aka JBOD) 
are not supported with the configured 3.6 inter.broker.protocol.version`



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