[
https://issues.apache.org/jira/browse/HBASE-5494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236857#comment-13236857
]
stack commented on HBASE-5494:
------------------------------
Thinking on this, I started to sketch a scheme where /unassigned in zk became
instead /regions and under /regions there'd be a subdir per table and then
under each table, you'd do something like what is described here
http://zookeeper.apache.org/doc/r3.1.2/recipes.html#Shared+Locks only instead
of read/write we'd have a sort of exclusive-access vs non-exclusive-access.
Already the above would be a massive refactor not to mind compounding it with
the fact that doing an exclusive-operation, you'll usually want to do something
like close all regions on a table (disabling) and to do that you'd need to be
able to do non-exclusive operations...
Let me start over and make a little grid of what operations we do not want to
run concurrently. Will post here. Might be able to get away w/ something
less disruptive and more basic.
> 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