You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2009/01/04 08:24:46 UTC

[jira] Updated: (HBASE-1090) Atomic Check And Save in HTable

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

stack updated HBASE-1090:
-------------------------

    Attachment: 1090v3.patch

Michael, the test fails for me.  It seems as though it has to do with your returning a Boolean from checkAndSave.  I think if you change it to return the primitive boolean type, it should work.  The attached patch applies (v2 doesn't apply since I added your other patch).  You might move the testCheckAndSave up in TestHTable so its first and runs first before all others while your debugging to save yourself some time.

Good stuff (otherwise patch looks good to me).

> Atomic Check And Save in HTable
> -------------------------------
>
>                 Key: HBASE-1090
>                 URL: https://issues.apache.org/jira/browse/HBASE-1090
>             Project: Hadoop HBase
>          Issue Type: New Feature
>            Reporter: Michael Gottesman
>            Priority: Minor
>         Attachments: 1090v3.patch, hbase-1090.patch, hbase-1090v2.patch
>
>
> Check And Save is a simple operation where one gives both a BatchUpdate with updates and a Map mapping columns to expected values (byte[] -> byte[]). The operation works as follows:
> 1. Server gets locks on row.
> 2. Server checks that the actual values of the specified columns match the given expected values
> 3. If False, return False, if True update the row
> 4. Unlock row.
> Pretty simple... but useful.
> Included in the attached patch are the necessary updates for HTable, HRegionServer, RegionServerInterface, and HRegion. I also added a small unit test to HTable where the test checks that checkAndSave succeeds when the expected values line up and fail when the values are different.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.