hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-3584) We need to atomically put/delete/increment in one call
Date Thu, 12 Jan 2012 21:04:41 GMT

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

Lars Hofhansl updated HBASE-3584:
---------------------------------

    Attachment: 3584-v1.txt

Here's an initial patch. Please have a look.
It includes a simple functional test and a multithreaded "stress test" which also includes
region flushes.

One point I could use some advice on:
>From the stress-test I found that I have to hold the region lock (HRegion.updatesLock.readLock())
for the entire duration of the atomic operation (initially I had thought that would not be
necessary).

The coprocessor pre hooks for delete and put state that they need to be run before the region
lock is acquired to avoid deadlocks.

So... I could (1) disable the pre/post delete and put hooks for this case and invent new hooks
for atomic operations, but that would make hard to generally capture puts or deletes.
Or I could (2) run only the pre-hooks *before* the atomic mutation, and memorize the results.
The post hooks would run as before.

                
> We need to atomically put/delete/increment in one call
> ------------------------------------------------------
>
>                 Key: HBASE-3584
>                 URL: https://issues.apache.org/jira/browse/HBASE-3584
>             Project: HBase
>          Issue Type: Bug
>            Reporter: ryan rawson
>         Attachments: 3584-v1.txt
>
>
> Right now we have the following calls:
> put(Put)
> delete(Delete)
> increment(Increments)
> But we cannot combine all of the above in a single call, complete with a single row lock.
 It would be nice to do that.
> It would also allow us to do a CAS where we could do a put/increment if the check succeeded.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message