gaurav-narula commented on code in PR #15863:
URL: https://github.com/apache/kafka/pull/15863#discussion_r1590313031
##########
core/src/main/scala/kafka/log/LogCleaner.scala:
##########
@@ -182,6 +183,27 @@ class LogCleaner(initialConfig: CleanerConfig,
cleanerManager.removeMetrics()
Review Comment:
I reckon the metrics in `LogCleanerManager` would remained removed? Perhaps
they shouldn't be removed while reconfiguring?
##########
core/src/main/scala/kafka/log/LogCleaner.scala:
##########
@@ -159,6 +159,7 @@ class LogCleaner(initialConfig: CleanerConfig,
cleaners += cleaner
cleaner.start()
}
+ activateMetrics();
Review Comment:
Would be useful to add the test in the original JIRA for posterity.
##########
core/src/main/scala/kafka/log/LogCleaner.scala:
##########
@@ -182,6 +183,27 @@ class LogCleaner(initialConfig: CleanerConfig,
cleanerManager.removeMetrics()
}
+ /**
+ * Activate metrics
+ */
+ def activateMetrics():Unit = {
+ metricsGroup.newGauge(MaxBufferUtilizationPercentMetricName,
Review Comment:
Perhaps we can remove the declarations in the class field above around line
130?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]