private void checkAndMaybeComplete() {
    // operationCompleted is true if Blob_Authorization_Failure was received.
    if (operationTracker.isDone() || operationCompleted) {
      if (operationTracker.hasSucceeded()) {
        operationException.set(null);
      } else {
        if (operationTracker.hasFailedOnNotFound()) {
          operationException.set(new RouterException("UndeleteOperation failed because of BlobNotFound",
              RouterErrorCode.BlobDoesNotExist));
        } else if (operationTracker.hasSomeUnavailability()) {
          setOperationException(
              new RouterException("UndeleteOperation failed possibly because some replicas are unavailable",
                  RouterErrorCode.AmbryUnavailable));
        }
      }
      if (QuotaUtils.postProcessCharge(quotaChargeCallback)) {
        try {
          quotaChargeCallback.checkAndCharge(false, true);
        } catch (QuotaException quotaException) {
          LOGGER.info("Exception {} while charging quota for undelete operation", quotaException.toString());
        }
      }
      operationCompleted = true;
    }
  }
Completes the {@code UndeleteOperation} if it is done.
ambry-router/src/main/java/com/github/ambry/router/UndeleteOperation.java