@Override
  protected void releaseLatch(MasterProcedureEnv env) {
    if (cleanerDisabled) {
      env.getMasterServices().getReplicationLogCleanerBarrier().enable();
    }
    if (peerConfig.isSyncReplication()) {
      env.getMasterServices().getSyncReplicationPeerLock().release();
    }
    super.releaseLatch(env);
  }
The procedure for adding a new replication peer.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AddPeerProcedure.java