@Override
  public DeleteResult isDeleted(ExtendedCell cell) {
    long duplicateMvcc = prepare(cell);

    for (Map.Entry<Long, DeleteVersionsNode> e : delColMap.tailMap(cell.getSequenceId())
      .entrySet()) {
      DeleteVersionsNode node = e.getValue();
      long deleteMvcc = Long.MAX_VALUE;
      SortedSet<Long> deleteVersionMvccs = node.deletesMap.get(cell.getTimestamp());
      if (deleteVersionMvccs != null) {
        SortedSet<Long> tail = deleteVersionMvccs.tailSet(cell.getSequenceId());
        if (!tail.isEmpty()) {
          deleteMvcc = tail.first();
        }
      }
      SortedMap<Long, SortedSet<Long>> subMap = node.mvccCountingMap.subMap(cell.getSequenceId(),
        true, Math.min(duplicateMvcc, deleteMvcc), true);
      for (Map.Entry<Long, SortedSet<Long>> seg : subMap.entrySet()) {
        if (seg.getValue().size() >= maxVersions) {
          return DeleteResult.VERSION_MASKED;
        }
        seg.getValue().add(cell.getSequenceId());
      }
      if (deleteMvcc < Long.MAX_VALUE) {
        return DeleteResult.VERSION_DELETED;
      }

      if (cell.getTimestamp() <= node.ts) {
        return DeleteResult.COLUMN_DELETED;
      }
    }
    if (duplicateMvcc < Long.MAX_VALUE) {
      return DeleteResult.VERSION_MASKED;
    }
    return DeleteResult.NOT_DELETED;
  }
This method is not idempotent, we will save some info to judge VERSION_MASKED.
@param cell - current cell to check if deleted by a previously seen delete
@return We don't distinguish DeleteColumn and DeleteFamily. We only return code for column.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NewVersionBehaviorTracker.java