[
https://issues.apache.org/jira/browse/HBASE-16865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15627001#comment-15627001
]
Stephen Yuan Jiang commented on HBASE-16865:
--------------------------------------------
The following is hard-coded to check parent and root - either we should
recursively check parents if we support more than 3-levels in the future or we
can assume that the root always passing down, then we should just check root -
{{proc.hasParent() && isLockOwner(proc.getRootProcId())}}
{code}
public synchronized boolean hasParentLock(final Procedure proc) {
- return proc.hasParent() && isLockOwner(proc.getParentProcId());
+ return proc.hasParent() &&
+ (isLockOwner(proc.getParentProcId()) ||
isLockOwner(proc.getRootProcId()));
}
{code}
> Procedure v2 - Inherit lock from root proc
> ------------------------------------------
>
> Key: HBASE-16865
> URL: https://issues.apache.org/jira/browse/HBASE-16865
> Project: HBase
> Issue Type: Sub-task
> Components: proc-v2
> Affects Versions: 2.0.0
> Reporter: Matteo Bertozzi
> Assignee: Matteo Bertozzi
> Fix For: 2.0.0
>
> Attachments: HBASE-16865-v0.patch
>
>
> At the moment we support inheriting locks from the parent procedure for a 2
> level procedures, but in case of reopen table regions we have a 3 level
> procedures (ModifyTable -> ReOpen -> [Unassign/Assign]) and reopen does not
> have any locks on its own.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)