[ https://issues.apache.org/jira/browse/HBASE-20847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16538646#comment-16538646 ]
Duo Zhang commented on HBASE-20847: ----------------------------------- {quote} You are arguing we should never take an exclusive lock on a table? For a modifytableprocedure? {quote} We need to release the exclusive lock if we are scheduling sub procedures. This is what we do for now. {quote} Assign can only proceed after WAL logs have been split... so if an SCP and a ModifyTableProcedure at same time, MTP should wait until SCP has finished log splitting before proceeding.... SCP should wait till MTP has done assigning/unassiging before it tries assigning? {quote} We need to hold the lock. You can think from opposite, what if the SCP schedules AssignProcedure and then there comes a ModifyTableProcedure? Here we do not need to wait so long if the MTP comes first. We just schedule the AssignProcedures, but it will blocked if MTP has held the exclusive lock. And after MTP schedules Unassign/AssignProcedures, it will release the exclusive lock and we can go on. The lock recovery after master restarts will be addressed by HBASE-20846, it is another story. Here the problem is we need to aqcuire the shared lock every time even if the procedure has a parent. > 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 > Assignee: Duo Zhang > Priority: Major > Attachments: HBASE-20847-v1.patch, HBASE-20847-v2.patch, > HBASE-20847.patch > > > 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)