HBASE-20173 [AMv2] DisableTableProcedure concurrent to ServerCrashProcedure can deadlock
commit72c3d27bf6465dd84b99759476acb12eced33196
authorMichael Stack <stack@apache.org>
Sun, 11 Mar 2018 20:15:16 +0000 (11 13:15 -0700)
committerMichael Stack <stack@apache.org>
Tue, 13 Mar 2018 13:04:36 +0000 (13 06:04 -0700)
tree3905d09d0978ed9f9d40f46667b67f7875e8ca5f
parentb037db4e876715a9f11e6730e040833515483f1c
HBASE-20173 [AMv2] DisableTableProcedure concurrent to ServerCrashProcedure can deadlock

Allow that DisableTableProcedue can grab a region lock before
ServerCrashProcedure can. Cater to this cricumstance where SCP
was not unable to make progress by running the search for RIT
against the crashed server a second time, post creation of all
crashed-server assignemnts. The second run will uncover such as
the above DisableTableProcedure unassign and will interrupt its
suspend allowing both procedures to make progress.

M hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
 Add new procedure step post-assigns that reruns the RIT finder method.

M hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
 Make this important log more specific as to what is going on.

M hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/UnassignProcedure.java
 Better explanation as to what is going on.

M hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerCrashProcedure.java
 Add extra step and run handleRIT a second time after we've queued up
 all SCP assigns. Also fix a but. SCP was adding an assign of a RIT
 that was actually trying to unassign (made the deadlock more likely).
hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java
hbase-protocol-shaded/src/main/protobuf/MasterProcedure.proto
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/UnassignProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RecoverMetaProcedure.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerCrashProcedure.java