public void replay(ZkMigrationStateRecord record) {
        ZkMigrationState newState = ZkMigrationState.of(record.zkMigrationState());
        ZkMigrationState previousState = migrationControlState.get();
        if (previousState.equals(newState)) {
            log.debug("Replayed a ZkMigrationStateRecord which did not alter the state from {}.",
                    previousState);
        } else {
            migrationControlState.set(newState);
            log.info("Replayed a ZkMigrationStateRecord changing the migration state from {} to {}.",
                    previousState, newState);
        }
    }
Tests if the controller should be preventing metadata updates due to being in the PRE_MIGRATION
state. If the controller does not yet support migrations (before 3.4-IV0), then the migration state
will be NONE and this will return false. Once the controller has been upgraded to a version that supports
migrations, then this method checks if the migration state is equal to PRE_MIGRATION.
metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java