private void dispathWals(SyncReplicationReplayWALManager syncReplicationReplayWALManager)
    throws ProcedureYieldException {
    try {
      List<Path> wals = syncReplicationReplayWALManager.getReplayWALsAndCleanUpUnusedFiles(peerId);
      addChildProcedure(wals.stream()
        .map(wal -> new SyncReplicationReplayWALProcedure(peerId,
          Arrays.asList(syncReplicationReplayWALManager.removeWALRootPath(wal))))
        .toArray(SyncReplicationReplayWALProcedure[]::new));
    } catch (IOException e) {
      LOG.warn("Failed to get replay wals for peer id={}, , retry", peerId, e);
      throw new ProcedureYieldException();
    }
  }
The procedure for replaying all the remote wals for transitting a sync replication peer from
STANDBY to DOWNGRADE_ACTIVE.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RecoverStandbyProcedure.java