FrankYang0529 commented on code in PR #18414:
URL: https://github.com/apache/kafka/pull/18414#discussion_r1913389324


##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -637,21 +637,12 @@ class KafkaConfig private(doLog: Boolean, val props: 
util.Map[_, _])
     if (nodeId != brokerId) {
       throw new ConfigException(s"You must set 
`${KRaftConfigs.NODE_ID_CONFIG}` to the same value as 
`${ServerConfigs.BROKER_ID_CONFIG}`.")
     }
-    if (requiresZookeeper) {
-      if (zkConnect == null) {
-        throw new ConfigException(s"Missing required configuration 
`${ZkConfigs.ZK_CONNECT_CONFIG}` which has no default value.")
-      }
-      if (brokerIdGenerationEnable) {
-        require(brokerId >= -1 && brokerId <= maxReservedBrokerId, "broker.id 
must be greater than or equal to -1 and not greater than 
reserved.broker.max.id")
-      } else {
-        require(brokerId >= 0, "broker.id must be greater than or equal to 0")
-      }
-    } else {
-      // KRaft-based metadata quorum
-      if (nodeId < 0) {
-        throw new ConfigException(s"Missing configuration 
`${KRaftConfigs.NODE_ID_CONFIG}` which is required " +
-          s"when `process.roles` is defined (i.e. when running in KRaft 
mode).")
-      }
+    if (processRoles.isEmpty) {

Review Comment:
   I didn't know that. Thanks for the suggestion. Updated it. The failed case 
`AbstractCoordinatorTest#testWakeupAfterSyncGroupReceivedExternalCompletion ` 
is not related to this PR and already have a Jira to track it.
   
   https://issues.apache.org/jira/browse/KAFKA-18310



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to