public void notifyPeersToRemoveSyncLogChannel(Peer targetPeer) {
    // The configuration will be modified during iterating because we will add the targetPeer to
    // configuration
    ImmutableList<Peer> currentMembers = ImmutableList.copyOf(this.configuration);
    removeSyncLogChannel(targetPeer);
    for (Peer peer : currentMembers) {
      if (peer.equals(targetPeer)) {
        // if the targetPeer is the same as current peer, skip it because removing itself is illegal
        continue;
      }
      if (!peer.equals(thisNode)) {
        // use RPC to tell other peers to build sync log channel to target peer
        try (SyncIoTConsensusServiceClient client =
            syncClientManager.borrowClient(peer.getEndpoint())) {
          TRemoveSyncLogChannelRes res =
              client.removeSyncLogChannel(
                  new TRemoveSyncLogChannelReq(
                      targetPeer.getGroupId().convertToTConsensusGroupId(),
                      targetPeer.getEndpoint(),
                      targetPeer.getNodeId()));
          if (!isSuccess(res.status)) {
            logger.warn("removing sync log channel failed from {} to {}", peer, targetPeer);
          }
        } catch (Exception e) {
          logger.warn(
              "Exception happened during removing sync log channel from {} to {}",
              peer,
              targetPeer,
              e);
        }
      }
    }
  }
records the index of the log and writes locally, and then asynchronous replication is
performed.
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java