private String checkRegionOperationWithRemoveDataNode(
      TConsensusGroupId regionId, TDataNodeLocation targetDataNode) {
    Optional<Procedure<ConfigNodeProcedureEnv>> conflictRemoveDataNodesProcedure =
        getExecutor().getProcedures().values().stream()
            .filter(
                procedure -> {
                  if (procedure instanceof RemoveDataNodesProcedure) {
                    return !procedure.isFinished();
                  }
                  return false;
                })
            .findAny();

    if (conflictRemoveDataNodesProcedure.isPresent()) {
      RemoveDataNodeHandler removeDataNodeHandler = env.getRemoveDataNodeHandler();
      List<TDataNodeLocation> removedDataNodes =
          ((RemoveDataNodesProcedure) conflictRemoveDataNodesProcedure.get()).getRemovedDataNodes();
      Set<TConsensusGroupId> removedDataNodesRegionSet =
          removeDataNodeHandler.getRemovedDataNodesRegionSet(removedDataNodes);
      if (removedDataNodesRegionSet.contains(regionId)) {
        return String.format(
            "Another RemoveDataNodesProcedure %s is already in processing which conflicts with this procedure. "
                + "The RemoveDataNodesProcedure is removing the DataNodes %s which contains the region %s. "
                + "For further information, please search [pid%d] in log. ",
            conflictRemoveDataNodesProcedure.get().getProcId(),
            removedDataNodes,
            regionId,
            conflictRemoveDataNodesProcedure.get().getProcId());
      } else if (removedDataNodes.contains(targetDataNode)) {
        return String.format(
            "Another RemoveDataNodesProcedure %s is already in processing which conflicts with this procedure. "
                + "The RemoveDataNodesProcedure is removing the target DataNode %s. "
                + "For further information, please search [pid%d] in log. ",
            conflictRemoveDataNodesProcedure.get().getProcId(),
            targetDataNode,
            conflictRemoveDataNodesProcedure.get().getProcId());
      }
    }
    return null;
  }
The common checks of all region operations, include migration, reconstruction, extension,
removing

@param regionId region group id, also called consensus group id
@param targetDataNode DataNode should in Running status
@param relatedDataNodes Pair<Identity, Node Location>
@return The reason if check failed, or null if check pass
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java