cmccabe commented on code in PR #15238: URL: https://github.com/apache/kafka/pull/15238#discussion_r1470231305
########## metadata/src/test/java/org/apache/kafka/metadata/migration/CapturingMigrationClient.java: ########## @@ -139,14 +139,18 @@ public ZkMigrationLeadershipState setMigrationRecoveryState(ZkMigrationLeadershi @Override public ZkMigrationLeadershipState claimControllerLeadership(ZkMigrationLeadershipState state) { - this.state = state; - return state; + if (state.zkControllerEpochZkVersion() == ZkMigrationLeadershipState.EMPTY.zkControllerEpochZkVersion()) { Review Comment: Can we just compare against -2 (or at least have a constant for this like `ZkMigrationLeadershipState.UNKNOWN_ZK_VERSION`?) -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org