You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chia7712 (via GitHub)" <gi...@apache.org> on 2026/10/26 17:15:06 UTC

Re: [PR] KAFKA-20488 Use ZK controller epoch when writing partition state znodes [kafka]

chia7712 commented on code in PR #23946:
URL: https://github.com/apache/kafka/pull/23946#discussion_r4380246937


##########
core/src/test/scala/unit/kafka/zk/migration/ZkMigrationClientTest.scala:
##########
@@ -158,6 +158,52 @@ class ZkMigrationClientTest extends ZkMigrationTestHarness {
     assertEquals(List(1, 2, 3), partition1.isr)
   }
 
+  /**
+   * The controller_epoch stored in a partition state znode is compared against the epoch of the ZK
+   * controller (see KAFKA-20488), so the migration client must write the ZK controller epoch and
+   * not the KRaft controller epoch.
+   */
+  @Test
+  def testPartitionStateUsesZkControllerEpoch(): Unit = {
+    // Claiming the controller bumps the ZK controller epoch from the pre-created 1 to 2, which keeps

Review Comment:
   What does `pre-created 1 to 2` mean?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org