HBASE-16093 Fix splits failed before creating daughter regions leave meta inconsistent

This commit is contained in:
Elliott Clark 2016-06-23 11:27:44 -07:00
parent b6e2bc5ad1
commit 93d82112f0
1 changed files with 13 additions and 2 deletions

View File

@ -3758,9 +3758,20 @@ public class AssignmentManager extends ZooKeeperListener {
if (!org.apache.commons.lang.StringUtils.isEmpty(s)) {
return s;
}
// Always bring the parent back online. Even if it's not offline
// There's no harm in making it online again.
regionOnline(p, sn);
regionOffline(a);
regionOffline(b);
// Only offline the region if they are known to exist.
RegionState regionStateA = regionStates.getRegionState(a);
RegionState regionStateB = regionStates.getRegionState(b);
if (regionStateA != null) {
regionOffline(a);
}
if (regionStateB != null) {
regionOffline(b);
}
if (getTableStateManager().isTableState(p.getTable(),
ZooKeeperProtos.Table.State.DISABLED, ZooKeeperProtos.Table.State.DISABLING)) {