hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinod (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8626) RowMutations fail when Delete and Put on same columnFamily/column/row
Date Wed, 29 May 2013 10:05:21 GMT

    [ https://issues.apache.org/jira/browse/HBASE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13669131#comment-13669131
] 

Vinod commented on HBASE-8626:
------------------------------

In the use-case above, the client does not know upfront what all columns the row/column-family
has. I guess this would be a common use-case in schema-free data stores like HBase.

The client now gets a new copy of the entire row, essentially new data for that row which
might not have all the columns the row has currently. So it needs to atomically _replace_
the entire row with this new data.

So one way I could think of is to use RowMutations to first delete entire column family and
then Put the new columns to same column family. 

Another way would be to read the row first to figure out the current columns and then create
a non-overlapping set of Puts and Deletes and add those to the RowMutations. But this a check-then-act
scenario which can cause inconsistency. Also this causes multiple round trips to the server.

Any other ways to address this use-case?
                
> 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

Mime
View raw message