Class TestRecoverUnknownWithNullRegionLocation

java.lang.Object
org.apache.hadoop.hbase.master.TestRecoverUnknownWithNullRegionLocation

@Tag("org.apache.hadoop.hbase.testclassification.MasterTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests") public class TestRecoverUnknownWithNullRegionLocation extends Object
Test for HBASE-30142. Verifies that scheduleSCPsForUnknownServers (i.e. the recoverUnknown HBCK command) does not throw a NullPointerException when a region's regionLocation is null while its state is something other than OFFLINE.

Before HBASE-30142, ServerManager.isServerUnknown(org.apache.hadoop.hbase.ServerName) returned true for a null server name, so a region whose location had been temporarily nulled (e.g. between region transitions or while marking it FAILED_OPEN / ABNORMALLY_CLOSED) was treated as living on an "unknown" server. The downstream call to shouldSubmitSCP(null) then dereferenced the null and crashed.