private boolean shouldUpload(MessageInfo messageInfo) {
    if (messageInfo.isDeleted()) {
      return false;
    }
    if (checkCacheState(messageInfo.getStoreKey().getID())) {
      return false;
    }
    if (isVcr) {
      // VCR only backs up blobs with expiration time above threshold.
      // Expired blobs are blocked by ReplicaThread.
      // TODO: VCR for non-backup also needs to replicate everything
      // We can change default cloudConfig.vcrMinTtlDays to 0 and override in config
      return !isExpiringSoon(messageInfo);
    } else {
      // Upload all live blobs
      return true;
    }
  }
Utility to decide whether a blob should be uploaded.
@param messageInfo The {@link MessageInfo} containing the blob metadata.
@return {@code true} is the blob should be upload, {@code false} otherwise.
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudBlobStore.java