Github user yonigottesman commented on a diff in the pull request:

    https://github.com/apache/incubator-omid/pull/39#discussion_r205961668
  
    --- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
    @@ -298,26 +291,62 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
             return commitCache;
         }
     
    -    private void buildFamilyDeletionCache(List<Cell> rawCells, Map<String, 
List<Cell>> familyDeletionCache) {
    -
    +    private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List<Cell> rawCells, Map<String, Long> familyDeletionCache, Map<Long, Long> 
commitCache, Map<String,byte[]> attributeMap) throws IOException {
             for (Cell cell : rawCells) {
                 if (CellUtil.matchingQualifier(cell, 
CellUtils.FAMILY_DELETE_QUALIFIER) &&
                         CellUtil.matchingValue(cell, 
HConstants.EMPTY_BYTE_ARRAY)) {
    -
                     String row = Bytes.toString(cell.getRow());
    -                List<Cell> cells = familyDeletionCache.get(row);
    -                if (cells == null) {
    -                    cells = new ArrayList<>();
    -                    familyDeletionCache.put(row, cells);
    +                String family = Bytes.toString(cell.getFamily());
    +                String key = row + ":" + family;
    +
    +                if (familyDeletionCache.containsKey(key))
    +                    return;
    +
    +                Optional<Long> commitTimeStamp = isCellInSnapshot(cell, 
transaction, commitCache);
    +
    +                if (!commitTimeStamp.isPresent()) {
    --- End diff --
    
    why call this twice?


---

Reply via email to