hudeqi commented on code in PR #13960: URL: https://github.com/apache/kafka/pull/13960#discussion_r1259333798
########## core/src/main/scala/kafka/controller/KafkaController.scala: ########## @@ -537,6 +538,7 @@ class KafkaController(val config: KafkaConfig, private def removeMetrics(): Unit = { KafkaController.MetricNames.foreach(metricsGroup.removeMetric) + controllerContext.stats.removeMetrics() Review Comment: I first put the registration and removal of the metric of `ControllerStats` into `initializeControllerContext` and `resetContext`. In addition, I also called `resetContext` in all the places where the `ControllerContext` was instantiated in the unit tests, so as to remove the `ControllerStats` metric. -- 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