[
https://issues.apache.org/jira/browse/HBASE-7374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534591#comment-13534591
]
Enis Soztutar commented on HBASE-7374:
--------------------------------------
Over at HBASE-7305, I am forward porting / adding table locking to operations
from master, and the semantics defined there has to be exposed to the
coprocessors as well. The patch I am working on has a sequence like:
- start rpc
- obtain table lock (on timeout throw TimeoutException)
- run preXXX coprocessors
- create XXXhandler object, schedule for execution
- run postXXX coprocessors
- end rpc
and in XXXHandler.process():
- run preXXXHandler coprocessors
- do the modification
- run postXXXHandler coprocessors
- release table lock (we should ensure that this does not happen before
postXXX coprocessors)
If we do the above sequence, we guarantee that the table lock is held during
all executions of the coprocessor for that table, however, all the other
operations for other tables has to obtain the lock. This might cause deadlocks,
but as long as we document it, it should be fine.
> Expose master table operations for coprocessors by way of MasterServices
> ------------------------------------------------------------------------
>
> Key: HBASE-7374
> URL: https://issues.apache.org/jira/browse/HBASE-7374
> Project: HBase
> Issue Type: Improvement
> Components: Coprocessors, master
> Affects Versions: 0.96.0, 0.94.4
> Reporter: Andrew Purtell
> Assignee: Andrew Purtell
> Priority: Minor
> Attachments: HBASE-7374-0.94.patch, HBASE-7374.patch
>
>
> I have something I'm working on that, as a coprocessor, when it initializes
> would like to add a column to a table should that column be missing. Exposing
> master table operations for coprocessors by way of MasterServices was how I
> solved this problem, and is generally useful for all master coprocessors.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira