showuon commented on code in PR #17210:
URL: https://github.com/apache/kafka/pull/17210#discussion_r1762258642


##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -847,7 +847,7 @@ class KafkaConfig private(doLog: Boolean, val props: 
util.Map[_, _])
       }
       if (brokerIdGenerationEnable) {
         if (migrationEnabled) {
-          require(brokerId != -1, "broker id generation is incompatible with 
migration to ZK. Please disable it before enabling migration")
+          require(brokerId != -1, "broker.id generation is incompatible with 
ZooKeeper migration. Please stop using it before enabling migration (set 
broker.id to a value greater or equal to 0).")

Review Comment:
   nit: I think we can set the condition explicitly to `brokerId >= 0` in this 
line. But of course, it's a pretty minor comment. It's fine we merge it as is 
for v3.9.0.



##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -967,7 +967,7 @@ class KafkaConfig private(doLog: Boolean, val props: 
util.Map[_, _])
       // ZK-based
       if (migrationEnabled) {
         require(brokerId >= 0,
-          "broker broker.id.generation.enable is incompatible with migration 
to ZK. Please disable it before enabling migration")
+          "broker.id generation is incompatible with ZooKeeper migration. 
Please stop using it before enabling migration (set broker.id to a value 
greater or equal to 0).")

Review Comment:
   This path and the above one (L850) are both under `validateValues` method. 
The above one is validate for ZK brokers (i.e. process.role is null). And this 
line is to validate KRaft, or migrating brokers. Both are related to this fix.



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