HBASE-11531 RegionStates for regions under region-in-transition znode are not updated on startup

This commit is contained in:
Jimmy Xiang 2014-07-23 15:30:32 -07:00
parent 13643807ad
commit b7e0bde346

View File

@ -474,7 +474,7 @@ public class AssignmentManager extends ZooKeeperListener {
if (!useZKForAssignment) { if (!useZKForAssignment) {
// Not use ZK for assignment any more, remove the ZNode // Not use ZK for assignment any more, remove the ZNode
ZKUtil.deleteNodeFailSilent(watcher, watcher.assignmentZNode); ZKUtil.deleteNodeRecursively(watcher, watcher.assignmentZNode);
} }
recoverTableInDisablingState(); recoverTableInDisablingState();
recoverTableInEnablingState(); recoverTableInEnablingState();
@ -733,7 +733,8 @@ public class AssignmentManager extends ZooKeeperListener {
final String prettyPrintedRegionName = HRegionInfo.prettyPrint(encodedName); final String prettyPrintedRegionName = HRegionInfo.prettyPrint(encodedName);
LOG.info("Processing " + prettyPrintedRegionName + " in state: " + et); LOG.info("Processing " + prettyPrintedRegionName + " in state: " + et);
if (regionStates.isRegionInTransition(encodedName)) { if (regionStates.isRegionInTransition(encodedName)
&& (regionInfo.isMetaRegion() || !useZKForAssignment)) {
LOG.info("Processed region " + prettyPrintedRegionName + " in state: " LOG.info("Processed region " + prettyPrintedRegionName + " in state: "
+ et + ", does nothing since the region is already in transition " + et + ", does nothing since the region is already in transition "
+ regionStates.getRegionTransitionState(encodedName)); + regionStates.getRegionTransitionState(encodedName));