private void waitForLeaderElected() {
    while (!configManager.getConsensusManager().isLeaderExist()) {
      LOGGER.info("Leader has not been elected yet, wait for 1 second");
      try {
        TimeUnit.SECONDS.sleep(1);
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        LOGGER.warn("Unexpected interruption during waiting for leader election.");
      }
    }
  }
Register Non-seed {@link ConfigNode} when first startup.

@throws StartupException if register failed.
@throws IOException if {@link ConsensusManager} init failed.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java