HBASE-7923 force unassign can confirm region online on any RS to get rid of double assignments

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1464232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-04-03 23:16:44 +00:00
parent bc5fc44966
commit a62eecc95a
1 changed files with 7 additions and 4 deletions

View File

@ -2267,11 +2267,14 @@ Server {
return urr;
}
}
if (force) {
this.assignmentManager.regionOffline(hri);
assignRegion(hri);
} else {
LOG.debug("Close region " + hri.getRegionNameAsString()
+ " on current location if it is online and reassign.force=" + force);
this.assignmentManager.unassign(hri, force);
if (!this.assignmentManager.getRegionStates().isRegionInTransition(hri)
&& !this.assignmentManager.getRegionStates().isRegionAssigned(hri)) {
LOG.debug("Region " + hri.getRegionNameAsString()
+ " is not online on any region server, reassigning it.");
assignRegion(hri);
}
if (cpHost != null) {
cpHost.postUnassign(hri, force);