KAFKA-10458; Updating controller quota does not work since Token Bucket (#9272)
This PR fixes two issues that have been introduced by #9114. - When the metric was switched from Rate to TokenBucket in the ControllerMutationQuotaManager, the metrics were mixed up. That broke the quota update path. - When a quota is updated, the ClientQuotaManager updates the MetricConfig of the KafkaMetric. That update was not reflected into the Sensor so the Sensor was still using the MetricConfig that it has been created with. Reviewers: Anna Povzner <anna@confluent.io>, Rajini Sivaram <rajinisivaram@googlemail.com>
显示
- clients/src/main/java/org/apache/kafka/common/metrics/Sensor.java 17 个添加, 8 个删除...src/main/java/org/apache/kafka/common/metrics/Sensor.java
- clients/src/test/java/org/apache/kafka/common/metrics/SensorTest.java 32 个添加, 2 个删除...test/java/org/apache/kafka/common/metrics/SensorTest.java
- core/src/main/scala/kafka/server/ClientQuotaManager.scala 15 个添加, 11 个删除core/src/main/scala/kafka/server/ClientQuotaManager.scala
- core/src/main/scala/kafka/server/ClientRequestQuotaManager.scala 1 个添加, 1 个删除...c/main/scala/kafka/server/ClientRequestQuotaManager.scala
- core/src/main/scala/kafka/server/ControllerMutationQuotaManager.scala 7 个添加, 7 个删除...n/scala/kafka/server/ControllerMutationQuotaManager.scala
- core/src/test/scala/unit/kafka/server/ControllerMutationQuotaTest.scala 53 个添加, 2 个删除...scala/unit/kafka/server/ControllerMutationQuotaTest.scala
加载中
想要评论请 注册 或 登录