Class TestOpenRegionProcedureRestoreFailedOpen

java.lang.Object
org.apache.hadoop.hbase.master.assignment.TestOpenRegionProcedureRestoreFailedOpen

@Tag("org.apache.hadoop.hbase.testclassification.MasterTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests") public class TestOpenRegionProcedureRestoreFailedOpen extends Object
HBASE-30357: OpenRegionProcedure#restoreSucceedState() must not force the region state to OPEN on master-failover restore when the persisted transition code is actually FAILED_OPEN.

To reproduce the exact crash window without racing a genuinely reporting RS, we intercept the RS's real OPENED report on the master side and rewrite it to FAILED_OPEN before it is persisted. While still on the RPC handler thread (i.e. before the woken child OpenRegionProcedure gets a chance to run its own execute() and persist anything to meta), we lock the RegionStateNode and perform a genuine restart of the master's ProcedureExecutor/AssignmentManager, forcing a real reload from the WALProcedureStore and hbase:meta - exactly the mechanism restoreSucceedState() is meant to handle.