hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Cohen <justin.co...@teamaol.com>
Subject Re: Row level locking?
Date Fri, 16 Jul 2010 21:43:21 GMT
In that case it would be 2 RPC, right?  do { get, update, checkAndPut } 
while (ret = false)?  Plus 2 for each contention?

Thanks,
-justin

On 7/16/10 5:09 PM, Ryan Rawson wrote:
> In the uncontended case this is fine, although you are doing 4 RPCs to
> accomplish what could be done in 1 (with CAS).
>
> But in the contended case, all the people waiting on that lock consume
> RPC handler threads eventually causing a temporary deadlock since the
> original lockholder will not be able to progress to release the lock.
> The 60 second release will kick in and things might flow again for a
> bit.
>
>
>
> On Fri, Jul 16, 2010 at 2:07 PM, Justin Cohen<justin.cohen@teamaol.com>  wrote:
>    
>> What kind of trouble?  I do quite a bit of:
>>
>>     l = lock(row);
>>     val = get(row);
>>     /* modify val */
>>     put(row, val);
>>     unlock(l);
>>
>> Is there an alternative?
>>
>> -justin
>>
>> On 7/16/10 4:02 PM, Ryan Rawson wrote:
>>      
>>> Also be very wary of using any
>>> of the explicit row locking calls, they are generally trouble for more
>>> or less everyone.
>>>        
>>      

Mime
View raw message