@Override
    public void close() throws InterruptedException {
        eventQueue.beginShutdown("KRaftMigrationDriver#shutdown");
        log.debug("Shutting down KRaftMigrationDriver");
        eventQueue.close();
    }
Check that the migration driver is in the correct state for a given event. If the event causes
updates (i.e., to ZK or broker RPCs), also check that the event is for the current KRaft controller epoch.
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationDriver.java