Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-13688

Incorrect metrics in KafkaController for replicasToDeleteCount and ineligibleReplicasToDeleteCount

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • controller
    • None

    Description

          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 

      Duplicate replica counts will get ignored in the total sum when the code above converts to a set.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cbernier Crispin Bernier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: