public TSStatus executeWithoutDuplicate(
      final String database,
      final TsTable table,
      final String tableName,
      final String queryId,
      final ProcedureType thisType,
      final Procedure<ConfigNodeProcedureEnv> procedure) {
    long procedureId;
    synchronized (this) {
      final Pair<Long, Boolean> procedureIdDuplicatePair =
          checkDuplicateTableTask(database, table, tableName, queryId, thisType);
      procedureId = procedureIdDuplicatePair.getLeft();

      if (procedureId == -1) {
        if (Boolean.TRUE.equals(procedureIdDuplicatePair.getRight())) {
          return RpcUtils.getStatus(
              TSStatusCode.OVERLAP_WITH_EXISTING_TASK,
              "Some other task is operating table with same name.");
        }
        this.executor.submitProcedure(procedure);
      } else {
        return waitingProcedureFinished(procedureId);
      }
    }
    return waitingProcedureFinished(procedure);
  }
Waiting until the specific procedure finished.

@param procedure The specific procedure
@return TSStatus the running result of this procedure
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java