chia7712 commented on code in PR #18641: URL: https://github.com/apache/kafka/pull/18641#discussion_r1928473563
########## core/src/main/scala/kafka/server/metadata/ClientQuotaMetadataManager.scala: ########## @@ -147,13 +148,13 @@ class ClientQuotaMetadataManager(private[metadata] val quotaManagers: QuotaManag // Convert entity into Options with sanitized values for QuotaManagers val (sanitizedUser, sanitizedClientId) = quotaEntity match { case UserEntity(user) => (Some(Sanitizer.sanitize(user)), None) - case DefaultUserEntity => (Some(ZooKeeperInternals.DEFAULT_STRING), None) + case DefaultUserEntity => (Some(ClientQuotaManager.DefaultString), None) Review Comment: We should use Option[BaseUserEntity] instead of a string. As mentioned previously (https://github.com/apache/kafka/pull/18641#discussion_r1922770484), there's no need for a specific string to represent the "default" value. ########## core/src/main/scala/kafka/server/ConfigHandler.scala: ########## @@ -146,9 +146,7 @@ class TopicConfigHandler(private val replicaManager: ReplicaManager, class BrokerConfigHandler(private val brokerConfig: KafkaConfig, private val quotaManagers: QuotaManagers) extends ConfigHandler with Logging { def processConfigChanges(brokerId: String, properties: Properties): Unit = { - if (brokerId == ZooKeeperInternals.DEFAULT_STRING) - brokerConfig.dynamicConfig.updateDefaultConfig(properties) - else if (brokerConfig.brokerId == brokerId.trim.toInt) { + if (brokerConfig.brokerId == brokerId.trim.toInt) { Review Comment: We must handle the "default" configs when the broker id is "empty" -- 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