You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Crispin Bernier (Jira)" <ji...@apache.org> on 2022/02/22 23:23:00 UTC

[jira] [Created] (KAFKA-13688) Incorrect metrics in KafkaController for replicasToDeleteCount and ineligibleReplicasToDeleteCount

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)