From ac49c8d3e9a54bfc1d31b87cb20593529a53e290 Mon Sep 17 00:00:00 2001 From: tedyu Date: Wed, 18 Feb 2015 06:24:47 -0800 Subject: [PATCH] HBASE-13061 RegionStates can remove wrong region from server holdings (Andrey Stepachev) --- .../java/org/apache/hadoop/hbase/master/RegionStates.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java index b45caff2cee..c27c0eeb606 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java @@ -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); }