protected boolean complete(MasterProcedureEnv env, Throwable error) {
    if (error != null) {
      LOG.warn("Replay wals {} on {} failed for peer id={}", wals, targetServer, peerId, error);
      return false;
    } else {
      truncateWALs(env);
      LOG.info("Replay wals {} on {} succeed for peer id={}", wals, targetServer, peerId);
      return true;
    }
  }
A remote procedure which is used to send replaying remote wal work to region server.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/SyncReplicationReplayWALRemoteProcedure.java