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

This commit is contained in:
tedyu 2015-02-18 06:24:47 -08:00
parent 0004aeea80
commit ac49c8d3e9
1 changed files with 3 additions and 1 deletions

View File

@ -466,7 +466,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);
}