harryfallows commented on code in PR #16280:
URL: https://github.com/apache/kafka/pull/16280#discussion_r1639672823


##########
core/src/main/scala/kafka/server/ConfigHandler.scala:
##########
@@ -239,19 +239,24 @@ class BrokerConfigHandler(private val brokerConfig: 
KafkaConfig,
 
   def processConfigChanges(brokerId: String, properties: Properties): Unit = {
     def getOrDefault(prop: String): Long = {
-      if (properties.containsKey(prop))
-        properties.getProperty(prop).toLong
-      else
-        QuotaConfigs.QUOTA_BYTES_PER_SECOND_DEFAULT
+      brokerConfig.dynamicConfig.currentDynamicBrokerConfigs get prop match {

Review Comment:
   Do you mean do something similar to the `TopicConfigHandler` 
`processConfigChanges` method where the update is done in the helper function? 
In this case we could call `updateQuota` only if the value or defaultValue has 
changed, which could be nice. The alternative would be doing the same logic but 
keeping the `getOrDefault` method and adding a few if statements at the end, 
which won't be the nicest.



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