Duo Zhang commented on HBASE-20708:

I think the difficulty here is that we have some cyclic dependencies. For 
example, we need to use hbase:meta to construct the region states, and also 
server state, and then we can construct ServerCrashProcedure since we need to 
use the server state to determine whether we are carrying meta.

For this case, I think we can change the code by checking the meta location 
file on zk to determine whether we are carrying meta, so that we can create 
ServerCrashProcedure at any time. And also, the serverQueue in 
MasterProcedureScheduler could be renamed to serverCrashQueue, and we can make 
sure that there will be only one procedure in the queue, which means that when 
we want to add a new SCP to a queue, we can make sure that the queue does not 
exist, so if the SCP is for a RS which carries meta, then we can give it a 
higher priority so it will be processed first.

Let me change the title of this issue and try to prepare a patch which removes 
the RMP from master startup.


> Make sure there is no race between the RMP scheduled when start up and the SCP
> ------------------------------------------------------------------------------
>                 Key: HBASE-20708
>                 URL: https://issues.apache.org/jira/browse/HBASE-20708
>             Project: HBase
>          Issue Type: Sub-task
>          Components: proc-v2, Region Assignment
>            Reporter: Duo Zhang
>            Priority: Critical
>             Fix For: 3.0.0, 2.1.0, 2.0.1
> In HBASE-20700, we make RecoverMetaProcedure use a special lock which is only 
> used by RMP to avoid dead lock with MoveRegionProcedure. But we will always 
> schedule a RMP when master starting up, so we still need to make sure that 
> there is no race between this RMP and other RMPs and SCPs scheduled before 
> the master restarts.

This message was sent by Atlassian JIRA

Reply via email to