chia7712 commented on code in PR #18196:
URL: https://github.com/apache/kafka/pull/18196#discussion_r1927327636


##########
core/src/main/scala/kafka/server/ControllerServer.scala:
##########
@@ -332,7 +332,17 @@ class ControllerServer(
         config,
         sharedServer.metadataPublishingFaultHandler,
         "controller",
-        clientQuotaMetadataManager))
+        clientQuotaMetadataManager
+      ))
+
+      // Set up the DynamicTopicClusterQuotaPublisher. This will enable quotas 
for the cluster and topics.
+      metadataPublishers.add(new DynamicTopicClusterQuotaPublisher(

Review Comment:
   Please add test for controller



##########
core/src/main/scala/kafka/server/metadata/DynamicTopicClusterQuotaPublisher.scala:
##########
@@ -0,0 +1,64 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ **/
+package kafka.server.metadata
+
+import kafka.server.KafkaConfig
+import kafka.server.QuotaFactory.QuotaManagers
+import kafka.utils.Logging
+import org.apache.kafka.image.{MetadataDelta, MetadataImage}
+import org.apache.kafka.image.loader.LoaderManifest
+import org.apache.kafka.server.fault.FaultHandler
+
+class DynamicTopicClusterQuotaPublisher (

Review Comment:
   Please add comments to this new publisher. we should emphasize this approach 
is temporary and there is a follow-up jira



##########
core/src/main/scala/kafka/server/metadata/KRaftMetadataCache.scala:
##########
@@ -545,3 +511,96 @@ class KRaftMetadataCache(
   }
 }
 
+object KRaftMetadataCache {

Review Comment:
   #18632 is trying to remove reference of `KRaftMetadataCache`, so maybe we 
can move the helpers to `MetadataCache`?



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