chia7712 commented on code in PR #18196:
URL: https://github.com/apache/kafka/pull/18196#discussion_r1922328336
##########
core/src/main/scala/kafka/server/metadata/DynamicClientQuotaPublisher.scala:
##########
@@ -48,9 +51,20 @@ 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 => {
+ if (delta.topicsDelta() != null || delta.clusterDelta() != null) {
Review Comment:
How about moving this callback trigger to a individual publisher? That can
decouple the callback and other publisher. Also, that can avoid producing
incorrect error message?
--
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]