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

Inconsistent in quorum controller fenced broker metric

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0, 3.2.0, 3.1.1, 3.3.0, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.3.1
    • 3.4.0, 3.3.2
    • None
    • None

    Description

      It is possible for controllers to replay a record twice. This happens when the active controller replays an uncommitted record, resigns and replays the same record when it becomes committed.

      The controller handles these transition changes by using timeline data structures and reverting to previous in-memory snapshots.

      This functionality is not used when computing the fenced and unfenced metrics. Specifically, the metric can over count when executing this code:

                 } else if (prevRegistration == null) {
                    if (registration.fenced()) {
                        controllerMetrics.setFencedBrokerCount(controllerMetrics.fencedBrokerCount() + 1);
                        log.info("Added new fenced broker: {}", registration.id());
                    } else {
                        controllerMetrics.setActiveBrokerCount(controllerMetrics.activeBrokerCount() + 1);
                        log.info("Added new unfenced broker: {}", registration.id());
                    }

      From ClusterControlManager::updateMetrics.

      Attachments

        Issue Links

          Activity

            People

              jsancio José Armando García Sancio
              jsancio José Armando García Sancio
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: