hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <els...@apache.org>
Subject Re: why use at least one rowlock to update
Date Mon, 28 Aug 2017 16:23:02 GMT
Please be patient when waiting for a response. Apache HBase is made up 
of community volunteers. Your expectation should be on the order of many 
hours (although, we strive to be faster).

I'd recommend that you begin by looking at a newer release than 0.94.2 
as there have likely been over 50 (guessing) newer releases since this 
release was made.

In general, rowlocks must be acquired to ensure that multiple updates to 
the same row are applied in full. Consider two transactions against the 
same row:

tx1: row=r1 set a=1, b=1
tx2: row=r1 set a=2, b=2

After tx1 and tx2 are both applied, r1 must either have the columns 
a=1,b=1 or a=2,b=2. It must not have a=1,b=2 or a=2,b=1. This is why 
some form of mutual exclusion must be applied inside of the RegionServer.

On 8/28/17 10:06 AM, JH Lin wrote:
> ping...
> 
> 
> 
> 
> 
> 
> 在2017年08月28 17时55分, "JH Lin"<match2008s@163.com>写道:
> 
> hi all,i dived into hbase source these days.when i read at the HRegion#doMiniBatchMutation(...)
block then one question flashed in my mind:why did writer use at least one rowlock to implement
mutation?(ie.Puts or Deletes etc)
>   since  if i have 10 rows to update,then it means that 9 rows have no rowlocks.so is
'at least one rowlock' more symbolic than practical significane?
>   AFAIK now,i think it's used to verify hbase' basic functions eg. rowlock mechanism.
> ---
> release:hbase-0.94.2
> pardon me if it's a bit old,but i just wonder to know its principle inside it.
> one more thing, my english is poor,so sorry for any typo.
> many thanks~
> 
> 
> 

Mime
View raw message