HBASE-13061 RegionStates can remove wrong region from server holdings (Andrey Stepachev)

This commit is contained in:
tedyu 2015-02-18 06:23:59 -08:00
parent 7b045d143a
commit d64ce31063
1 changed files with 3 additions and 1 deletions

View File

@ -426,7 +426,9 @@ public class RegionStates {
if (oldServerName == null) {
oldServerName = oldAssignments.remove(encodedName);
}
if (oldServerName != null && serverHoldings.containsKey(oldServerName)) {
if (oldServerName != null
&& !oldServerName.equals(serverName)
&& serverHoldings.containsKey(oldServerName)) {
LOG.info("Offlined " + hri.getShortNameToLog() + " from " + oldServerName);
removeFromServerHoldings(oldServerName, hri);
}