chia7712 commented on code in PR #18196: URL: https://github.com/apache/kafka/pull/18196#discussion_r1912966373
########## core/src/test/scala/integration/kafka/api/CustomQuotaCallbackTest.scala: ########## @@ -179,13 +212,12 @@ class CustomQuotaCallbackTest extends IntegrationTestHarness with SaslSetup { } private def createTopic(topic: String, numPartitions: Int, leader: Int): Unit = { - // TODO createTopic + TestUtils.createTopicWithAdmin(createAdminClient(), topic, brokers, controllerServers, numPartitions) Review Comment: You have to honor the `leader` to make replica leader hosted by correct broker - otherwise, this test will get flaky in the future ########## core/src/main/scala/kafka/server/metadata/DynamicClientQuotaPublisher.scala: ########## @@ -48,9 +51,13 @@ class DynamicClientQuotaPublisher( ): Unit = { val deltaName = s"MetadataDelta up to ${newImage.highestOffsetAndEpoch().offset}" try { - Option(delta.clientQuotasDelta()).foreach { clientQuotasDelta => - clientQuotaMetadataManager.update(clientQuotasDelta) - } + quotaManagers.clientQuotaCallback().ifPresent(clientQuotaCallback => { Review Comment: Should we invoke the callback only if nodes or topics have changes? -- 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