@Override
  protected Flow executeFromState(ConfigNodeProcedureEnv configNodeProcedureEnv, Integer state)
      throws InterruptedException {
    if (state < MAX_STATE) {
      if (state == MAX_STATE - 1 && !isDeserialized) {
        Thread.sleep(SLEEP_FOREVER);
      }
      try {
        createDatabase(configNodeProcedureEnv, state);
      } catch (ProcedureException e) {
        setFailure(e);
        return Flow.NO_MORE_STATE;
      }
      setNextState(state + 1);
      return Flow.HAS_MORE_STATE;
    }
    return Flow.NO_MORE_STATE;
  }
This procedure will create numerous databases (perhaps 100), during which the confignode leader
should be externally shutdown to test whether the procedure can be correctly recovered after the
leader change. The procedure will never finish until it's recovered from another ConfigNode.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/testonly/CreateManyDatabasesProcedure.java