[
https://issues.apache.org/jira/browse/HBASE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13669400#comment-13669400
]
Ted Yu commented on HBASE-8626:
-------------------------------
In Vinod's example, only one column family was involved. However, we should
consider multiple column families if the feature is supported.
{code}
Delete delete1 = new Delete(row);
delete1.deleteFamily(cf1);
//add new columns
Put put1 = new Put(row);
put1.add(cf1, col1, v1);
put1.add(cf1, col2, v2);
Delete delete2 = new Delete(row);
delete2.deleteFamily(cf2);
//add new columns
Put put2 = new Put(row);
put2.add(cf2, col3, v3);
put2.add(cf2, col4, v4);
{code}
In the above case, only two distinct timestamps are needed t and t+1 where the
Deletes carry t and Puts carry t+1.
> RowMutations fail when Delete and Put on same columnFamily/column/row
> ---------------------------------------------------------------------
>
> Key: HBASE-8626
> URL: https://issues.apache.org/jira/browse/HBASE-8626
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.94.7, 0.95.0
> Environment: Ubuntu 12.04, HBase 0.94.7
> Reporter: Vinod
> Assignee: Ted Yu
> Fix For: 0.94.7, 0.95.1
>
> Attachments: 8626-v1.txt, TestRowMutations.java,
> tests_for_row_mutations1.patch
>
>
> When RowMutations have a Delete followed by Put to same column family or
> columns or rows, only the Delete is happening while the Put is ignored so
> atomicity of RowMutations is broken for such cases.
> Attached is a unit test where the following tests are failing:
> - testDeleteCFThenPutInSameCF: Delete a column family and then Put to same
> column family.
> - testDeleteColumnThenPutSameColumn: Delete a column and then Put to same
> column.
> - testDeleteRowThenPutSameRow: Delete a row and then Put to same row
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira