This is a good one turned up by that really great unit test facility where we do double execution of procedures with kills in between.
The scenario in this case is interesting. It was brought on by the fix to "
HBASE-19165 TODO Handle stuck in transition: rit=OPENING, location=ve0538...." HBASE-19165 removed the presumption that an empty region state in hbase:meta meant OPENING.
The test that started failing was #testRecoveryAndDoubleExecution in TestRestoreSnapshotProcedure. A table is being deleted with kills and double execution of procedures enabled. The Table delete has mostly completed the delete of all regions and then the Master is killed. The new Master comes up, sees a few regions left in the hbase:meta but at least for a few, the state field is empty.
AMv2 tries to do the wrong thing which is reassign the region. It needs to do some probing to figure what to do with a region it doesn't know state on... e..g see if table is enabled or not.
Filing this issue to fix. Its part of a broader problem of what to do when state is empty in meta.