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


##########
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:
   Thanks, I reworded the comment. ` ZkMigrationTestHarness` sets the ZK 
controller epoch to 1, and `claimControllerLeadership`  makes it 2.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to