cmccabe commented on a change in pull request #10572: URL: https://github.com/apache/kafka/pull/10572#discussion_r631152959
########## File path: metadata/src/main/java/org/apache/kafka/controller/BrokersToIsrs.java ########## @@ -326,4 +326,14 @@ PartitionsOnReplicaIterator partitionsWithBrokerInIsr(int brokerId) { boolean hasLeaderships(int brokerId) { return iterator(brokerId, true).hasNext(); } + + int offlinePartitionCount() { Review comment: We cannot count through all the offline partitions this way every time metrics get fetched. As much as possible, there should be no `O(num_partitions)` operations in metrics collection. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org