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 531eee0031
commit 28c771a306
1 changed files with 3 additions and 2 deletions

View File

@ -478,7 +478,7 @@ public class AssignmentManager extends ZooKeeperListener {
if (!useZKForAssignment) {
// Not use ZK for assignment any more, remove the ZNode
ZKUtil.deleteNodeFailSilent(watcher, watcher.assignmentZNode);
ZKUtil.deleteNodeRecursively(watcher, watcher.assignmentZNode);
}
recoverTableInDisablingState();
recoverTableInEnablingState();
@ -744,7 +744,8 @@ public class AssignmentManager extends ZooKeeperListener {
final String prettyPrintedRegionName = HRegionInfo.prettyPrint(encodedName);
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: "
+ et + ", does nothing since the region is already in transition "
+ regionStates.getRegionTransitionState(encodedName));