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

Phabricator commented on HBASE-5494:
------------------------------------

avf has commented on the revision "[jira] [HBASE-5494] [89-fb] Table-level 
locks for schema changing operations.".

  Thanks for the inline comments, @tedyu -- I've replied to a few quick ones 
inline.

INLINE COMMENTS
  src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java:27 
DistributedLock is implemented as part of the patch (see DistributedLock.java)
  src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java:47 
Metadata for table level locks is stored as plain text -- this is to allow 
operations to view lock information from the zookeeper CLI: toStringBinary() 
would not be needed here.
  src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java:137 In 
this case, an IOException is thrown up to the caller: this is to indicate a 
non-recoverable ZooKeeper error (DistributedLock uses RecoverableZooKeeper 
class under the covers). .release() may also throw an IllegalStateException -- 
but this is essentially used an assertion in this case (releasing a lock that 
isn't held).

REVISION DETAIL
  https://reviews.facebook.net/D2997

                
> 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
>         Attachments: D2997.3.patch
>
>
> 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