@Override
  public void deleteLocalPeer(ConsensusGroupId groupId) throws ConsensusException {
    RaftGroupId raftGroupId = Utils.fromConsensusGroupIdToRaftGroupId(groupId);

    // send remove group to myself
    RaftClientReply reply;
    try {
      reply =
          server
              .get()
              .groupManagement(
                  GroupManagementRequest.newRemove(
                      localFakeId,
                      myself.getId(),
                      localFakeCallId.incrementAndGet(),
                      raftGroupId,
                      true,
                      false));
      if (!reply.isSuccess()) {
        throw new RatisRequestFailedException(reply.getException());
      }
    } catch (GroupMismatchException e) {
      throw new ConsensusGroupNotExistException(groupId);
    } catch (IOException e) {
      throw new RatisRequestFailedException(e);
    }
  }
Remove this IConsensus Peer out of ConsensusGroup(groupId, peers) Caller's responsibility to
call removeConsensusGroup to every peer of this group and ensure the group is fully removed

<p>underlying Ratis will 1. call GroupManagementApi to unregister self off the RaftGroup 2.
clean up
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java