public TSStatus submitRemoveRegionPeerTask(
      long procedureId,
      TDataNodeLocation originalDataNode,
      TConsensusGroupId regionId,
      TDataNodeLocation coordinator) {
    TSStatus status;

    // Send removeRegionPeer request to the rpcClientDataNode
    TMaintainPeerReq maintainPeerReq =
        new TMaintainPeerReq(regionId, originalDataNode, procedureId);
    status =
        (TSStatus)
            SyncDataNodeClientPool.getInstance()
                .sendSyncRequestToDataNodeWithRetry(
                    coordinator.getInternalEndPoint(),
                    maintainPeerReq,
                    CnToDnSyncRequestType.REMOVE_REGION_PEER);
    LOGGER.info(
        "{}, Send action removeRegionPeer finished, regionId: {}, rpcDataNode: {}",
        REGION_MIGRATE_PROCESS,
        regionId,
        getIdWithRpcEndpoint(coordinator));
    return status;
  }
Order the specific ConsensusGroup to remove peer for the old RegionReplica.

<p>The remove peer interface could be invoked at any DataNode who contains one of the
RegionReplica of the specified ConsensusGroup except the origin one

@param originalDataNode The DataNodeLocation who contains the original RegionReplica
@param regionId region id
@return TSStatus
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RegionMaintainHandler.java