private boolean shouldIssueForceDelete() {
    // The conditions to issue force delete to replicas
    // 1. the feature is enabled
    // 2. there is no successful replica. If we have success replicas, we should try on demand replication and retry
    // 3. error code precedence is over AmbryUnavailable. We don't do force delete if the error is BlobExpired or TooManyRequests.
    // 4. error code is not BlobDoesNotExist, when a blob doesn't exist, we shouldn't try to force delete
    // 5. it's not a delete request from BackgroundDeleter.

    // What does it mean? Here are the cases where we would need to force delete
    // 1. 2 or 3 originating replicas return unavailable, including replica unavailable, disk unavailable, retry_after_backoff, io_error, network error...
    // 2. we have 1 leader, 1 bootstrap, 1 offline replica in originating dc. They all return BlobNotFound
    // 3. we have 1 leader, 1 standby, 1 bootstrap, 1 offline replica in originating dc. They all return BlobNotFound.
    // These three cases won't return NOT_FOUND and won't trigger on demand replication and offline repair. But force delete
    // might be able to help.
    // Force delete shouldn't interfere with on demand replication and offline repair. But when force delete fails, it might
    // trigger on demand replication.

    // If the operationException is null, then this is a successful delete operation. don't try to issue force delete
    if (operationException.get() == null) {
      return false;
    }
    RouterErrorCode errorCode = ((RouterException) operationException.get()).getErrorCode();
    // @formatter:off
    return (routerConfig.routerForceDeleteEnabled
        && operationTracker.getSuccessCount() == 0
        && getPrecedenceLevel(errorCode) >= getPrecedenceLevel(RouterErrorCode.AmbryUnavailable)
        && errorCode != RouterErrorCode.BlobDoesNotExist
        && !isServiceBackgroundDeleter());
    // @formatter:on
  }
Check if we want to save the partially failed request to the secondary storage and fix it offline.
@return true if choose to fix it offline.
ambry-router/src/main/java/com/github/ambry/router/DeleteOperation.java