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

Duo Zhang commented on HBASE-20847:
-----------------------------------

And for the waitRegions method, I think we should apply the patch in 
HBASE-20846, i.e, always try to acquire the shared lock. But the implementation 
of procedure lock needs a bit modification. If the parent procedure already 
held the exclusive lock, instead of returning false to let the procedure wait, 
we should return true to let the procedure go on. The locks which have already 
been held by parent procedures should also be considered as held by sub 
procedures. This is OK as we can make sure that the parent procedure will not 
release the lock before the sub procedures, as it can only be executed again 
after all the sub procedures have finished.

Copied the comment from parent here.

And the logic is not simple, as when releasing a lock we need to wake other 
procedures. Anyway let me try to prepare a patch.

> The parent procedure of RegionTransitionProcedure may not have the table lock
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-20847
>                 URL: https://issues.apache.org/jira/browse/HBASE-20847
>             Project: HBase
>          Issue Type: Sub-task
>          Components: proc-v2, Region Assignment
>            Reporter: Duo Zhang
>            Priority: Major
>
> For example, SCP can also schedule AssignProcedure and obviously it will not 
> hold the table lock.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to