diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index c8c25f1c1d6..3540b19c38d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -2700,9 +2700,16 @@ public class AssignmentManager { + ", a=" + rs_a + ", b=" + rs_b; } + // Always bring the children back online. Even if they are not offline + // there's no harm in making them online again. regionOnline(a, serverName); regionOnline(b, serverName); - regionOffline(hri); + + // Only offline the merging region if it is known to exist. + RegionState rs_p = regionStates.getRegionState(hri); + if (rs_p != null) { + regionOffline(hri); + } if (getTableStateManager().isTableState(hri.getTable(), TableState.State.DISABLED, TableState.State.DISABLING)) {