hudeqi commented on code in PR #13960:
URL: https://github.com/apache/kafka/pull/13960#discussion_r1254619269


##########
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:
   My thought is: this PR is to remove the ControllerStats metric when the 
broker shutdown. Before that, every broker in the cluster has registered all 
the metrics of ControllerStats. If following your suggestion, then only the 
real controller broker will register the metrics of ControllerStats, while 
other brokers do not. I don’t know this Is a logical change of a piece 
necessary? @divijvaidya 



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