Crispin Bernier created KAFKA-13688: ---------------------------------------
Summary: Incorrect metrics in KafkaController for replicasToDeleteCount and ineligibleReplicasToDeleteCount Key: KAFKA-13688 URL: https://issues.apache.org/jira/browse/KAFKA-13688 Project: Kafka Issue Type: Bug Components: controller Reporter: Crispin Bernier {code:java} replicasToDeleteCount = if (!isActive) 0 else controllerContext.topicsToBeDeleted.map { topic => // For each enqueued topic, count the number of replicas that are not yet deleted controllerContext.replicasForTopic(topic).count { replica => controllerContext.replicaState(replica) != ReplicaDeletionSuccessful } }.sum ineligibleReplicasToDeleteCount = if (!isActive) 0 else controllerContext.topicsToBeDeleted.map { topic => // For each enqueued topic, count the number of replicas that are ineligible controllerContext.replicasForTopic(topic).count { replica => controllerContext.replicaState(replica) == ReplicaDeletionIneligible } }.sum {code} Duplicate replica counts will get ignored in the total sum when the code above converts to a set. -- This message was sent by Atlassian Jira (v8.20.1#820001)