end? 17 ZooKeeper Kafka Cluster (Brokers) B B B KRaft Controller Quorum C C C 初期状態: KRaft ModeのKafkaクラスタ Controller Epoch Value ZKMode 10 KRaft 5 Partition 10
end? 18 ZooKeeper Kafka Cluster (Brokers) B B B KRaft Controller Quorum C C C 検証の過程でquorumを過半数を下回ってしまい、KRaft Controller Epochが急上昇 Controller Epoch Value ZKMode 10 KRaft 5 → 100 Partition 10
end? 19 ZooKeeper Kafka Cluster (Brokers) B B B KRaft Controller Quorum C C C 検証過程でbroker 1台のサービスを停止。PartitionのLeader変更等の状態変更を controllerが要求し、受理される。Partitionのepochが、要求を受理したcontroller (KRaft Controller) のepochで上書きされる。 Controller Epoch Value ZKMode 10 KRaft 100 Partition 10 → 100 ControllerがPartition の状態変更を要求 KRaft Controllerの要求を受け入れ、 そのEpochの値でPartitionのController Epochが上書きされる
end? 20 ZooKeeper Kafka Cluster (Brokers) C B B KRaft Controller Quorum C C C KRaft Controller EpochがZKMode時のcontroller epochを上回った状態でロールバック Epochが100のcontrollerがサービスを停止し、実質的にcontroller不在の状態に Controller Epoch Value ZKMode 10 KRaft 100 Partition 100
< 3.9 operators 24 Precautions for Migrating Back to KRaft Mode 3.8 https://kafka.apache.org/38/operations/kraft/ 3.9 https://kafka.apache.org/39/operations/kraft/
3.9のドキュメントを見るのではなく、3.9にアップグレードしてからKRaft移行することを推奨します • 弊チームは、管轄の全Kafkaクラスタを3.8 → 3.9にアップグレードを行った Note for Kafka < 3.9 operators 25 Precautions for Migrating Back to KRaft Mode