[ https://issues.apache.org/jira/browse/KAFKA-14457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
José Armando García Sancio updated KAFKA-14457: ----------------------------------------------- Fix Version/s: 3.4.0 > Inconsistent in quorum controller fenced broker metric > ------------------------------------------------------ > > Key: KAFKA-14457 > URL: https://issues.apache.org/jira/browse/KAFKA-14457 > Project: Kafka > Issue Type: Bug > Affects Versions: 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 > Reporter: José Armando García Sancio > Assignee: José Armando García Sancio > Priority: Major > Fix For: 3.4.0 > > > 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: > {code:java} > } 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()); > }{code} > From {{ClusterControlManager::updateMetrics.}} -- This message was sent by Atlassian Jira (v8.20.10#820010)