hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-13061 RegionStates can remove wrong region from server holdings (Andrey Stepachev)
Date Wed, 18 Feb 2015 14:24:52 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 0004aeea8 -> ac49c8d3e


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


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ac49c8d3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ac49c8d3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ac49c8d3

Branch: refs/heads/branch-1
Commit: ac49c8d3e9a54bfc1d31b87cb20593529a53e290
Parents: 0004aee
Author: tedyu <yuzhihong@gmail.com>
Authored: Wed Feb 18 06:24:47 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed Feb 18 06:24:47 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/master/RegionStates.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ac49c8d3/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
----------------------------------------------------------------------
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 b45caff..c27c0ee 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);
         }


Mime
View raw message