private void processNewDelete(ScanResults results, StoreKey key, IndexValue deleteValue, IndexValue originalPutValue,
      IndexValue previousValue) {
    long operationTimeInMs = deleteValue.getOperationTimeInMs();
    if (operationTimeInMs == Utils.Infinite_Time) {
      operationTimeInMs =
          index.getIndexSegments().floorEntry(deleteValue.getOffset()).getValue().getLastModifiedTimeMs();
    }
    // First deal with container bucket
    if (previousValue.isDelete()) {
      // The previous value is already DELETE, current DELETE would not change container bucket.
      // Assume the record history looks like this: PUT, DELETE, DELETE.
      // First DELETE already updated container bucket.
    } else {
      // If original PUT expires before this DELETE, then it will not change container bucket.
      if (!isExpired(originalPutValue.getExpiresAtMs(), operationTimeInMs)) {
        handleContainerBucketUpdate(results, originalPutValue, operationTimeInMs, SUBTRACT);
        handleContainerBucketUpdate(results, originalPutValue, originalPutValue.getExpiresAtMs(), ADD);
      }
    }
    // Now deal with log segment bucket
    // Current DELETE is always valid
    if (previousValue.isDelete()) {
      // Previous IndexValue is a DELETE, it will be invalidated by current DELETE. So we have to revert the previous
      // DELETE here as if it doesn't exist. After reverting changes made by previous DELETE, we will process the current
      // DELETE IndexValue.
      processDeleteUpdateLogSegmentHelper(results, key, previousValue, originalPutValue, SUBTRACT);
    } else if (previousValue.isUndelete()) {
      // Previous IndexValue is an UNDELETE, it should already
      // 1. Added it's size to the base bucket of the scan result
      // we need to recover from this operation
      results.updateLogSegmentBaseBucket(previousValue.getOffset().getName(), SUBTRACT * previousValue.getSize());
    }
    // Process the current DELETE IndexValue.
    processDeleteUpdateLogSegmentHelper(results, key, deleteValue, originalPutValue, ADD);
  }
Helper function to process new DELETE entries and make appropriate updates to the given {@link ScanResults}.
@param results the {@link ScanResults} to apply the updates to
@param key the {@link StoreKey} of the new DELETE
@param deleteValue the {@link IndexValue} of the new DELETE
@param originalPutValue the {@link IndexValue} of the original PUT that is getting deleted
@param previousValue the {@link IndexValue} comes prior to the new DELETE
ambry-store/src/main/java/com/github/ambry/store/BlobStoreStats.java