[GitHub] incubator-omid pull request #39: [OMID-105] When a tentative family deletion...

2018-07-31 Thread yonigottesman
Github user yonigottesman commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/39#discussion_r206463065
  
--- 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 rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 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 commitTimeStamp = isCellInSnapshot(cell, 
transaction, commitCache);
+
+if (!commitTimeStamp.isPresent()) {
+commitTimeStamp = isCellInTransaction(cell, 
transaction, commitCache);
 }
 
-cells.add(cell);
+if (commitTimeStamp.isPresent()) {
+familyDeletionCache.put(key, commitTimeStamp.get());
+} else {
+Cell lastCell = cell;
+Map cmtCache;
+boolean foundCommitttedFamilyDeletion = false;
+while (!foundCommitttedFamilyDeletion) {
+
+Get g = createPendingGet(lastCell, 3);
+for (Map.Entry entry : 
attributeMap.entrySet()) {
--- End diff --

But we know exactly what we want, a delete cell which is something to do 
only with omid.
you are adding attributes that where aimed for the get of a cell by the 
user, to a delete cell of omid


---


[GitHub] incubator-omid pull request #39: [OMID-105] When a tentative family deletion...

2018-07-31 Thread yonigottesman
Github user yonigottesman commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/39#discussion_r206463988
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -298,26 +295,58 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 return commitCache;
 }
 
-private void buildFamilyDeletionCache(List rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 cells = familyDeletionCache.get(row);
-if (cells == null) {
-cells = new ArrayList<>();
-familyDeletionCache.put(row, cells);
+if (CellUtils.isFamilyDeleteCell(cell)) {
+String key = getRowFamilyString(cell);
+
+if (familyDeletionCache.containsKey(key))
+return;
+
+Optional commitTimeStamp = getTSIfInSnapshot(cell, 
transaction, commitCache);
+
+if (!commitTimeStamp.isPresent()) {
+commitTimeStamp = getTSIfInTransaction(cell, 
transaction, commitCache);
 }
 
-cells.add(cell);
+if (commitTimeStamp.isPresent()) {
+familyDeletionCache.put(key, commitTimeStamp.get());
+} else {
+Cell lastCell = cell;
+Map cmtCache;
+boolean foundCommitttedFamilyDeletion = false;
+while (!foundCommitttedFamilyDeletion) {
+
+Get g = createPendingGet(lastCell, 3);
+for (Map.Entry entry : 
attributeMap.entrySet()) {
+g.setAttribute(entry.getKey(), 
entry.getValue());
+}
+
+Result result = tableAccessWrapper.get(g);
+List resultCells = result.listCells();
+if (resultCells == null) {
+break;
+}
+
+cmtCache = buildCommitCache(resultCells);
+for (Cell c : resultCells) {
+if (CellUtils.isFamilyDeleteCell(c)) {
+commitTimeStamp = getTSIfInSnapshot(c, 
transaction, cmtCache);
--- End diff --

Must check if cell is in snapshot.



---


[GitHub] incubator-omid pull request #39: [OMID-105] When a tentative family deletion...

2018-07-31 Thread ohadshacham
Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/39#discussion_r206422618
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -395,8 +427,8 @@ private Get createPendingGet(Cell cell, int 
versionCount) throws IOException {
 }
 }
 
-if (isCellInTransaction(cell, transaction, commitCache) ||
-isCellInSnapshot(cell, transaction, commitCache)) {
+if (isCellInTransaction(cell, transaction, 
commitCache).isPresent() ||
+isCellInSnapshot(cell, transaction, 
commitCache).isPresent()) {
--- End diff --

Same as before


---


[GitHub] incubator-omid pull request #39: [OMID-105] When a tentative family deletion...

2018-07-31 Thread ohadshacham
Github user ohadshacham commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/39#discussion_r206422025
  
--- 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 rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 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 commitTimeStamp = isCellInSnapshot(cell, 
transaction, commitCache);
+
+if (!commitTimeStamp.isPresent()) {
+commitTimeStamp = isCellInTransaction(cell, 
transaction, commitCache);
 }
 
-cells.add(cell);
+if (commitTimeStamp.isPresent()) {
+familyDeletionCache.put(key, commitTimeStamp.get());
+} else {
+Cell lastCell = cell;
+Map cmtCache;
+boolean foundCommitttedFamilyDeletion = false;
+while (!foundCommitttedFamilyDeletion) {
+
+Get g = createPendingGet(lastCell, 3);
+for (Map.Entry entry : 
attributeMap.entrySet()) {
--- End diff --

I don't know which attribute the user wrote and whether he/she wrote a 
coprocessor that looks on these attributes and do something. 


---


[GitHub] incubator-omid pull request #39: [OMID-105] When a tentative family deletion...

2018-07-31 Thread yonigottesman
Github user yonigottesman commented on a diff in the pull request:

https://github.com/apache/incubator-omid/pull/39#discussion_r206462235
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -298,26 +295,58 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 return commitCache;
 }
 
-private void buildFamilyDeletionCache(List rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 cells = familyDeletionCache.get(row);
-if (cells == null) {
-cells = new ArrayList<>();
-familyDeletionCache.put(row, cells);
+if (CellUtils.isFamilyDeleteCell(cell)) {
+String key = getRowFamilyString(cell);
+
+if (familyDeletionCache.containsKey(key))
+return;
+
+Optional commitTimeStamp = getTSIfInSnapshot(cell, 
transaction, commitCache);
--- End diff --

maybe first call getTSIfInTransaction because its faster and doesnt go 
through commit table and stuff


---


[jira] [Commented] (OMID-107) Replace HTableInterface with Table

2018-07-31 Thread James Taylor (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563909#comment-16563909
 ] 

James Taylor commented on OMID-107:
---

OmidTransactionTable constructs a TTable by passing in an HTableInterface, so 
to fix this, we'll need TTable constructor to take a Table argument instead:
{code:java}
tTable = new TTable(hTable, true);{code}
 

> Replace HTableInterface with Table
> --
>
> Key: OMID-107
> URL: https://issues.apache.org/jira/browse/OMID-107
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: James Taylor
>Priority: Major
>
> In HBase 2.0, the HTableInterface has been replaced with the Table interface. 
> Thus, in Omid, this same replacement should take place. This will mostly be 
> isolated to having TTable implement Table instead of HTableInterface. This 
> will be required to check-in Omid support in Phoenix, since Phoenix 5.x is 
> based on HBase 2.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (OMID-106) Delete does not use write timestamp after checkpoint

2018-07-31 Thread Ohad Shacham (JIRA)


 [ 
https://issues.apache.org/jira/browse/OMID-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ohad Shacham closed OMID-106.
-

> Delete does not use write timestamp after checkpoint
> 
>
> Key: OMID-106
> URL: https://issues.apache.org/jira/browse/OMID-106
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
> Delete should use write timestamp when writing family deletion marker. This 
> is noticeable after a checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (OMID-105) Family deletion seek should continue when a tentative value is found

2018-07-31 Thread Ohad Shacham (JIRA)


 [ 
https://issues.apache.org/jira/browse/OMID-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ohad Shacham closed OMID-105.
-

> Family deletion seek should continue when a tentative value is found 
> -
>
> Key: OMID-105
> URL: https://issues.apache.org/jira/browse/OMID-105
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
>  
> When a tentative family deletion marker is found. We need to continue looking 
> until we either find a  committed one in the past or no committed family 
> deletion marker for this column is found. Otherwise, we might miss committed 
> family deletion markers that exists in a transaction snapshot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (OMID-106) Delete does not use write timestamp after checkpoint

2018-07-31 Thread Ohad Shacham (JIRA)


 [ 
https://issues.apache.org/jira/browse/OMID-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ohad Shacham resolved OMID-106.
---
Resolution: Fixed

> Delete does not use write timestamp after checkpoint
> 
>
> Key: OMID-106
> URL: https://issues.apache.org/jira/browse/OMID-106
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
> Delete should use write timestamp when writing family deletion marker. This 
> is noticeable after a checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-105) Family deletion seek should continue when a tentative value is found

2018-07-31 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563501#comment-16563501
 ] 

Yonatan Gottesman commented on OMID-105:


looks good

> Family deletion seek should continue when a tentative value is found 
> -
>
> Key: OMID-105
> URL: https://issues.apache.org/jira/browse/OMID-105
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
>  
> When a tentative family deletion marker is found. We need to continue looking 
> until we either find a  committed one in the past or no committed family 
> deletion marker for this column is found. Otherwise, we might miss committed 
> family deletion markers that exists in a transaction snapshot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-105) Family deletion seek should continue when a tentative value is found

2018-07-31 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563497#comment-16563497
 ] 

ASF GitHub Bot commented on OMID-105:
-

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

https://github.com/apache/incubator-omid/pull/39#discussion_r206490639
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -298,26 +295,58 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 return commitCache;
 }
 
-private void buildFamilyDeletionCache(List rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 cells = familyDeletionCache.get(row);
-if (cells == null) {
-cells = new ArrayList<>();
-familyDeletionCache.put(row, cells);
+if (CellUtils.isFamilyDeleteCell(cell)) {
+String key = getRowFamilyString(cell);
+
+if (familyDeletionCache.containsKey(key))
+return;
+
+Optional commitTimeStamp = getTSIfInSnapshot(cell, 
transaction, commitCache);
+
+if (!commitTimeStamp.isPresent()) {
+commitTimeStamp = getTSIfInTransaction(cell, 
transaction, commitCache);
 }
 
-cells.add(cell);
+if (commitTimeStamp.isPresent()) {
+familyDeletionCache.put(key, commitTimeStamp.get());
+} else {
+Cell lastCell = cell;
+Map cmtCache;
+boolean foundCommitttedFamilyDeletion = false;
+while (!foundCommitttedFamilyDeletion) {
+
+Get g = createPendingGet(lastCell, 3);
+for (Map.Entry entry : 
attributeMap.entrySet()) {
+g.setAttribute(entry.getKey(), 
entry.getValue());
+}
+
+Result result = tableAccessWrapper.get(g);
+List resultCells = result.listCells();
+if (resultCells == null) {
+break;
+}
+
+cmtCache = buildCommitCache(resultCells);
+for (Cell c : resultCells) {
+if (CellUtils.isFamilyDeleteCell(c)) {
+commitTimeStamp = getTSIfInSnapshot(c, 
transaction, cmtCache);
--- End diff --

We start reading backward from the readTimeStamp, therefore, if the 
transaction wrote family deletion marker then we will find it in line 306.


> Family deletion seek should continue when a tentative value is found 
> -
>
> Key: OMID-105
> URL: https://issues.apache.org/jira/browse/OMID-105
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
>  
> When a tentative family deletion marker is found. We need to continue looking 
> until we either find a  committed one in the past or no committed family 
> deletion marker for this column is found. Otherwise, we might miss committed 
> family deletion markers that exists in a transaction snapshot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-105) Family deletion seek should continue when a tentative value is found

2018-07-31 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563406#comment-16563406
 ] 

ASF GitHub Bot commented on OMID-105:
-

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

https://github.com/apache/incubator-omid/pull/39#discussion_r206463065
  
--- 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 rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 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 commitTimeStamp = isCellInSnapshot(cell, 
transaction, commitCache);
+
+if (!commitTimeStamp.isPresent()) {
+commitTimeStamp = isCellInTransaction(cell, 
transaction, commitCache);
 }
 
-cells.add(cell);
+if (commitTimeStamp.isPresent()) {
+familyDeletionCache.put(key, commitTimeStamp.get());
+} else {
+Cell lastCell = cell;
+Map cmtCache;
+boolean foundCommitttedFamilyDeletion = false;
+while (!foundCommitttedFamilyDeletion) {
+
+Get g = createPendingGet(lastCell, 3);
+for (Map.Entry entry : 
attributeMap.entrySet()) {
--- End diff --

But we know exactly what we want, a delete cell which is something to do 
only with omid.
you are adding attributes that where aimed for the get of a cell by the 
user, to a delete cell of omid


> Family deletion seek should continue when a tentative value is found 
> -
>
> Key: OMID-105
> URL: https://issues.apache.org/jira/browse/OMID-105
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
>  
> When a tentative family deletion marker is found. We need to continue looking 
> until we either find a  committed one in the past or no committed family 
> deletion marker for this column is found. Otherwise, we might miss committed 
> family deletion markers that exists in a transaction snapshot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-105) Family deletion seek should continue when a tentative value is found

2018-07-31 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563404#comment-16563404
 ] 

ASF GitHub Bot commented on OMID-105:
-

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

https://github.com/apache/incubator-omid/pull/39#discussion_r206462235
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -298,26 +295,58 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 return commitCache;
 }
 
-private void buildFamilyDeletionCache(List rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 cells = familyDeletionCache.get(row);
-if (cells == null) {
-cells = new ArrayList<>();
-familyDeletionCache.put(row, cells);
+if (CellUtils.isFamilyDeleteCell(cell)) {
+String key = getRowFamilyString(cell);
+
+if (familyDeletionCache.containsKey(key))
+return;
+
+Optional commitTimeStamp = getTSIfInSnapshot(cell, 
transaction, commitCache);
--- End diff --

maybe first call getTSIfInTransaction because its faster and doesnt go 
through commit table and stuff


> Family deletion seek should continue when a tentative value is found 
> -
>
> Key: OMID-105
> URL: https://issues.apache.org/jira/browse/OMID-105
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
>  
> When a tentative family deletion marker is found. We need to continue looking 
> until we either find a  committed one in the past or no committed family 
> deletion marker for this column is found. Otherwise, we might miss committed 
> family deletion markers that exists in a transaction snapshot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-105) Family deletion seek should continue when a tentative value is found

2018-07-31 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563405#comment-16563405
 ] 

ASF GitHub Bot commented on OMID-105:
-

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

https://github.com/apache/incubator-omid/pull/39#discussion_r206463988
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -298,26 +295,58 @@ public CommitTimestamp locateCellCommitTimestamp(long 
cellStartTimestamp, long e
 return commitCache;
 }
 
-private void buildFamilyDeletionCache(List rawCells, Map> familyDeletionCache) {
-
+private void buildFamilyDeletionCache(HBaseTransaction transaction, 
List rawCells, Map familyDeletionCache, Map 
commitCache, Map 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 cells = familyDeletionCache.get(row);
-if (cells == null) {
-cells = new ArrayList<>();
-familyDeletionCache.put(row, cells);
+if (CellUtils.isFamilyDeleteCell(cell)) {
+String key = getRowFamilyString(cell);
+
+if (familyDeletionCache.containsKey(key))
+return;
+
+Optional commitTimeStamp = getTSIfInSnapshot(cell, 
transaction, commitCache);
+
+if (!commitTimeStamp.isPresent()) {
+commitTimeStamp = getTSIfInTransaction(cell, 
transaction, commitCache);
 }
 
-cells.add(cell);
+if (commitTimeStamp.isPresent()) {
+familyDeletionCache.put(key, commitTimeStamp.get());
+} else {
+Cell lastCell = cell;
+Map cmtCache;
+boolean foundCommitttedFamilyDeletion = false;
+while (!foundCommitttedFamilyDeletion) {
+
+Get g = createPendingGet(lastCell, 3);
+for (Map.Entry entry : 
attributeMap.entrySet()) {
+g.setAttribute(entry.getKey(), 
entry.getValue());
+}
+
+Result result = tableAccessWrapper.get(g);
+List resultCells = result.listCells();
+if (resultCells == null) {
+break;
+}
+
+cmtCache = buildCommitCache(resultCells);
+for (Cell c : resultCells) {
+if (CellUtils.isFamilyDeleteCell(c)) {
+commitTimeStamp = getTSIfInSnapshot(c, 
transaction, cmtCache);
--- End diff --

Must check if cell is in snapshot.



> Family deletion seek should continue when a tentative value is found 
> -
>
> Key: OMID-105
> URL: https://issues.apache.org/jira/browse/OMID-105
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
>  
> When a tentative family deletion marker is found. We need to continue looking 
> until we either find a  committed one in the past or no committed family 
> deletion marker for this column is found. Otherwise, we might miss committed 
> family deletion markers that exists in a transaction snapshot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-106) Delete does not use write timestamp after checkpoint

2018-07-31 Thread Yonatan Gottesman (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563380#comment-16563380
 ] 

Yonatan Gottesman commented on OMID-106:


looks good

> Delete does not use write timestamp after checkpoint
> 
>
> Key: OMID-106
> URL: https://issues.apache.org/jira/browse/OMID-106
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
> Delete should use write timestamp when writing family deletion marker. This 
> is noticeable after a checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-106) Delete does not use write timestamp after checkpoint

2018-07-31 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563327#comment-16563327
 ] 

Ohad Shacham commented on OMID-106:
---

Bug was identified in PHOENIX-4783.

> Delete does not use write timestamp after checkpoint
> 
>
> Key: OMID-106
> URL: https://issues.apache.org/jira/browse/OMID-106
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
> Delete should use write timestamp when writing family deletion marker. This 
> is noticeable after a checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-108) TTable should support batch method

2018-07-31 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563260#comment-16563260
 ] 

Ohad Shacham commented on OMID-108:
---

We explicitly do a flush only before committing the transaction, otherwise, it 
might violate SI. However, the writes are batched during the transaction. We 
count on HBase's auto flush in this case.

> TTable should support batch method
> --
>
> Key: OMID-108
> URL: https://issues.apache.org/jira/browse/OMID-108
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: James Taylor
>Priority: Major
>
> Phoenix exclusively uses the Table.batch() method to submit data to the HBase 
> region servers, but it looks like TTable does not support this. To be honest, 
> I'm not entirely sure how it's even working now. :) We should support the 
> batch method, though. I believe it'd be pretty trivial - simply switching on 
> the Mutation class to call existing TTable methods.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-107) Replace HTableInterface with Table

2018-07-31 Thread Ohad Shacham (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563255#comment-16563255
 ] 

Ohad Shacham commented on OMID-107:
---

It does use  HTableInterace inside TTable.

> Replace HTableInterface with Table
> --
>
> Key: OMID-107
> URL: https://issues.apache.org/jira/browse/OMID-107
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: James Taylor
>Priority: Major
>
> In HBase 2.0, the HTableInterface has been replaced with the Table interface. 
> Thus, in Omid, this same replacement should take place. This will mostly be 
> isolated to having TTable implement Table instead of HTableInterface. This 
> will be required to check-in Omid support in Phoenix, since Phoenix 5.x is 
> based on HBase 2.0.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OMID-105) Family deletion seek should continue when a tentative value is found

2018-07-31 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/OMID-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563251#comment-16563251
 ] 

ASF GitHub Bot commented on OMID-105:
-

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

https://github.com/apache/incubator-omid/pull/39#discussion_r206422618
  
--- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java 
---
@@ -395,8 +427,8 @@ private Get createPendingGet(Cell cell, int 
versionCount) throws IOException {
 }
 }
 
-if (isCellInTransaction(cell, transaction, commitCache) ||
-isCellInSnapshot(cell, transaction, commitCache)) {
+if (isCellInTransaction(cell, transaction, 
commitCache).isPresent() ||
+isCellInSnapshot(cell, transaction, 
commitCache).isPresent()) {
--- End diff --

Same as before


> Family deletion seek should continue when a tentative value is found 
> -
>
> Key: OMID-105
> URL: https://issues.apache.org/jira/browse/OMID-105
> Project: Apache Omid
>  Issue Type: Sub-task
>Reporter: Ohad Shacham
>Assignee: Ohad Shacham
>Priority: Major
>
>  
> When a tentative family deletion marker is found. We need to continue looking 
> until we either find a  committed one in the past or no committed family 
> deletion marker for this column is found. Otherwise, we might miss committed 
> family deletion markers that exists in a transaction snapshot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)