You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/16 16:58:41 UTC
[GitHub] [kafka] hachikuji commented on a diff in pull request #12158: MINOR:A few code cleanUps in KafkaController
hachikuji commented on code in PR #12158:
URL: https://github.com/apache/kafka/pull/12158#discussion_r873958800
##########
core/src/main/scala/kafka/controller/KafkaController.scala:
##########
@@ -468,14 +468,6 @@ class KafkaController(val config: KafkaConfig,
// shutdown leader rebalance scheduler
kafkaScheduler.shutdown()
- offlinePartitionCount = 0
Review Comment:
The way `updateMetrics` is written is a little annoying. While we're at it, would it be any clearer to revise `updateMetrics` to the following structure:
```scala
if (isActive) {
offlinePartitionCount = controllerContext.offlinePartitionCount
...
} else {
offlinePartitionCount = 0
...
}
```
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org