showuon commented on code in PR #12979: URL: https://github.com/apache/kafka/pull/12979#discussion_r1056904807
########## core/src/main/scala/kafka/log/UnifiedLog.scala: ########## @@ -1795,10 +1803,10 @@ class UnifiedLog(@volatile var logStartOffset: Long, * remove deleted log metrics */ private[log] def removeLogMetrics(): Unit = { - removeMetric(LogMetricNames.NumLogSegments, tags) - removeMetric(LogMetricNames.LogStartOffset, tags) - removeMetric(LogMetricNames.LogEndOffset, tags) - removeMetric(LogMetricNames.Size, tags) + metricNames.foreach { + case (name, tags) => removeMetric(name, tags) + } + metricNames = Map.empty Review Comment: Is it because when we tried to removeMetrics, the tags might become "non-future"? -- 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