mumrah commented on code in PR #15695: URL: https://github.com/apache/kafka/pull/15695#discussion_r1560175751
########## core/src/main/scala/kafka/server/KafkaServer.scala: ########## @@ -657,15 +657,19 @@ class KafkaServer( } private def createCurrentControllerIdMetric(): Unit = { - KafkaYammerMetrics.defaultRegistry().newGauge(MetadataLoaderMetrics.CURRENT_CONTROLLER_ID, () => { - Option(metadataCache) match { - case None => -1 - case Some(cache) => cache.getControllerId match { Review Comment: Ah right, makes sense 👍 -- 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