cmccabe commented on code in PR #15695:
URL: https://github.com/apache/kafka/pull/15695#discussion_r1560168052


##########
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:
   It should be OK in hybrid mode since we are still updating the znode in 
hybrid mode. And this comes from there directly.



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