public SagaResponse apply()

in saga-core/src/main/java/org/apache/servicecomb/saga/core/ForwardRecovery.java [29:57]


  public SagaResponse apply(SagaTask task, SagaRequest request, SagaResponse parentResponse) {
    try {
      for(int i = 0; isRetryable(i, request.transaction()); i++) {
        try {
          return request.transaction().send(request.serviceName(), parentResponse);
        } catch (Exception e) {
          log.error("Applying {} policy due to failure in transaction {} of service {}",
              description(),
              request.transaction(),
              request.serviceName(),
              e
          );
          Thread.sleep(request.failRetryDelayMilliseconds());
        }
      }
    } catch (InterruptedException ignored) {
      log.warn("Applying {} interrupted in transaction {} of service {}",
          description(),
          request.transaction(),
          request.serviceName(),
          ignored);
      throw new TransactionFailedException(ignored);
    }
    throw new TransactionAbortedException(
        String.format(
            "Too many failures in transaction %s of service %s, abort the transaction!",
            request.transaction(),
            request.serviceName()));
  }