HBASE-5829 Inconsistency between the "regions" map and the "servers" map in AssignmentManager
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1330993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d7110681df
commit
6d848a1943
|
@ -1663,6 +1663,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
}
|
}
|
||||||
synchronized (this.regions) {
|
synchronized (this.regions) {
|
||||||
this.regions.put(plan.getRegionInfo(), plan.getDestination());
|
this.regions.put(plan.getRegionInfo(), plan.getDestination());
|
||||||
|
addToServers(plan.getDestination(), plan.getRegionInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2078,6 +2079,10 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
// Remove from the regionsMap
|
// Remove from the regionsMap
|
||||||
synchronized (this.regions) {
|
synchronized (this.regions) {
|
||||||
this.regions.remove(region);
|
this.regions.remove(region);
|
||||||
|
Set<HRegionInfo> serverRegions = this.servers.get(server);
|
||||||
|
if (!serverRegions.remove(region)) {
|
||||||
|
LOG.warn("No " + region + " on " + server);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
deleteClosingOrClosedNode(region);
|
deleteClosingOrClosedNode(region);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue