Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added None state and two new metrics

...

MBean nameDescription
kafka.server:type=KafkaServer,name=MetadataType

An enumeration of: ZooKeeper (1) or KRaft (2). Each broker reports this.

kafka.controller:type=KafkaController,name=MetadataTypeAn enumeration of: ZooKeeper (1), KRaft (2), or Dual (3). The active controller reports this.
kafka.controller:type=KafkaController,name=Features,feature={feature},level={level}The finalized set of features with their level as seen by the controller. Used to help operators see the cluster's current metadata.version
kafka.controller:type=KafkaController,name=MigrationStateAn enumeration of the possible migration states the cluster can be in. This is only reported by the active controller. 
kafka.controller:type=KafkaController,name=MigrationIneligibleBrokerCountA count of ZK brokers that are not eligible for migration. This metric will only be reported by the active KRaft controller while in the "MigrationInelgible" MigrationState. If not in that state, it will report zero.
kafka.controller:type=KafkaController,name=MigrationIneligibleControllerCountA count of KRaft quorum controllers that are not eligible for migration. This metric will only be reported by the active KRaft controller while in the "MigrationInelgible" MigrationState. If not in that state, it will report zero.
kafka.controller:type=KafkaController,name=ZooKeeperWriteBehindLagThe amount of lag in records that ZooKeeper is behind relative to the highest committed record in the metadata log. This metric will only be reported by the active KRaft controller.
kafka.controller:type=KafkaController,name=ZooKeeperBlockingKRaftMillisThe number of milliseconds a write to KRaft has been blocked due to lagging ZooKeeper writes. This metric will only be reported by the active KRaft controller.

...

Here is a state machine description of the migration. There will likely be more internal states that the controller uses, but these four will be exposed as the MigrationState metric.


State

Enum

Description

None0This cluster started out as KRaft and was not migrated.

MigrationIneligible

1

The brokers and controllers do not meet the migration criteria. The cluster is operating in ZooKeeper mode.

MigratingZkData

2

The controller is copying data from ZooKeeper into KRaft.

DualWriteMetadata

3

The controller is in KRaft mode making dual writes to ZooKeeper.

MigrationFinalized

4

The cluster has been migrated to KRaft mode.

...