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:25:31 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 57a41e68a -> 78594e869


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/78594e86
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/78594e86
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/78594e86

Branch: refs/heads/branch-1.0
Commit: 78594e8691638764d6dfaf55514068a46dc507a5
Parents: 57a41e6
Author: tedyu <yuzhihong@gmail.com>
Authored: Wed Feb 18 06:25:26 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed Feb 18 06:25:26 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/78594e86/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 ec709be..f03c5f5 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
@@ -440,7 +440,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