public void notifyPeersToDropConsensusPipe(Peer targetPeer)
      throws ConsensusGroupModifyPeerException {
    final List<Peer> otherPeers = peerManager.getOtherPeers(thisNode);
    for (Peer peer : otherPeers) {
      if (peer.equals(targetPeer)) {
        continue;
      }
      try (SyncPipeConsensusServiceClient client =
          syncClientManager.borrowClient(peer.getEndpoint())) {
        TNotifyPeerToDropConsensusPipeResp resp =
            client.notifyPeerToDropConsensusPipe(
                new TNotifyPeerToDropConsensusPipeReq(
                    targetPeer.getGroupId().convertToTConsensusGroupId(),
                    targetPeer.getEndpoint(),
                    targetPeer.getNodeId()));
        if (!RpcUtils.SUCCESS_STATUS.equals(resp.getStatus())) {
          throw new ConsensusGroupModifyPeerException(
              String.format("error when notify peer %s to drop consensus pipe", peer));
        }
      } catch (Exception e) {
        LOGGER.warn(
            "{} cannot notify peer {} to drop consensus pipe, may because that peer is unknown currently, please manually check!",
            thisNode,
            peer,
            e);
      }
    }

    try {
      dropConsensusPipeToTargetPeer(targetPeer);
    } catch (Exception e) {
      LOGGER.warn(
          "{} cannot drop consensus pipe to {}, may because target peer is unknown currently, please manually check!",
          thisNode,
          targetPeer,
          e);
      throw new ConsensusGroupModifyPeerException(e);
    }
  }
update given consensus pipes' status, returns the peer corresponding to the pipe that failed to
update
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensusServerImpl.java