cmccabe commented on code in PR #13407: URL: https://github.com/apache/kafka/pull/13407#discussion_r1173091174
########## metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationDriver.java: ########## @@ -396,18 +418,36 @@ class WaitForControllerQuorumEvent extends MigrationEvent { @Override public void run() throws Exception { - switch (migrationState) { - case WAIT_FOR_CONTROLLER_QUORUM: - if (isControllerQuorumReadyForMigration()) { - log.debug("Controller Quorum is ready for Zk to KRaft migration"); - // Note that leadership would not change here. Hence we do not need to - // `apply` any leadership state change. - transitionTo(MigrationDriverState.WAIT_FOR_BROKERS); + if (migrationState.equals(MigrationDriverState.WAIT_FOR_CONTROLLER_QUORUM)) { + if (!firstPublish) { + log.trace("Waiting until we have received metadata before proceeding with migration"); + return; + } + + ZkMigrationState zkMigrationState = image.features().zkMigrationState(); Review Comment: we can have a switch statement here right? -- 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