Skip to sidebarSkip to main conteStatus

Current stateadopted

Discussion thread: here

JIRA: KAFKA-15980 - Getting issue details... STATUS

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

The purpose of adding a CurrentControllerId metric is to have an easy way to identify the current controller by looking at the metrics of any Kafka node (broker or controller).

Public Interfaces

CurrentControllerId

Name

Context

Type

Mode

Description

kafka.server:type=MetadataLoader,name=CurrentControllerIdBroker and ControllerIntegerKRaft and ZKOutputs the ID of the current controller, or -1 if none is known.

The CurrentControllerId metric shows the ID of the controller, as seen by the node in question. If the current node doesn't think there is an active controller, the value of thisd metric will be -1.

Compatibility, Deprecation, and Migration Plan

Since this is a new metric, there are no compatibility issues.

Test Plan

The new metric will need unit and integration tests as per usual.

Rejected Alternatives

One rejected alternative is using the existing ActiveControllerCount metric. However, when in KRaft mode, ActiveControllerCount is only exposed on controller nodes, not on broker nodes. That makes it impossible to monitor what the brokers think the current active controller is.

  • No labels