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

stack commented on HBASE-5494:
------------------------------

I think maybe region locks is for later.  Meantime, getting a read lock on the 
table when doing a split or merge might carry us a long way.....before we need 
region specific locks.

@Mubarak Todd has a good point that respecting locking order is important.  
Maybe we should use the facility where zk can add the seqid to the name?  So 
maybe locks are named:

<zookeeper.znode.parent>/locks/<table_name>/r-seqid

or

<zookeeper.znode.parent>/locks/<table_name>/w-seqid

where the data then is details on who took the lock?

And you can't take a write lock if any instances of read lock outstanding?

I was thinking that maybe clients would be prepared to wait some time obtaining 
a read lock but that they might fail fast if they could not get a read lock?
                
> Introduce a zk hosted table-wide read/write lock so only one table operation 
> at a time
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-5494
>                 URL: https://issues.apache.org/jira/browse/HBASE-5494
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: stack
>
> I saw this facility over in the accumulo code base.
> Currently we just try to sort out the mess when splits come in during an 
> online schema edit; somehow we figure we can figure all possible region 
> transition combinations and make the right call.
> We could try and narrow the number of combinations by taking out a zk table 
> lock when doing table operations.
> For example, on split or merge, we could take a read-only lock meaning the 
> table can't be disabled while these are running.
> We could then take a write only lock if we want to ensure the table doesn't 
> change while disabling or enabling process is happening.
> Shouldn't be too hard to add.

--
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

        

Reply via email to