Repository: hbase Updated Branches: refs/heads/branch-2.1 d19e6dff2 -> 5b8c76737
HBASE-21421 Do not kill RS if reportOnlineRegions fails Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5b8c7673 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5b8c7673 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5b8c7673 Branch: refs/heads/branch-2.1 Commit: 5b8c7673743eae7f143b23e683cf03d123caeb47 Parents: d19e6df Author: Allan Yang <allan...@apache.org> Authored: Tue Nov 6 14:51:54 2018 +0800 Committer: Allan Yang <allan...@apache.org> Committed: Tue Nov 6 14:51:54 2018 +0800 ---------------------------------------------------------------------- .../hadoop/hbase/master/assignment/AssignmentManager.java | 10 +++++----- .../hbase/master/assignment/TestRogueRSAssignment.java | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/5b8c7673/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java index 4492342..2b3244d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java @@ -1007,8 +1007,7 @@ public class AssignmentManager implements ServerListener { } } - void checkOnlineRegionsReport(final ServerStateNode serverNode, final Set<byte[]> regionNames) - throws YouAreDeadException { + void checkOnlineRegionsReport(final ServerStateNode serverNode, final Set<byte[]> regionNames) { final ServerName serverName = serverNode.getServerName(); try { for (byte[] regionName: regionNames) { @@ -1047,9 +1046,10 @@ public class AssignmentManager implements ServerListener { } } } catch (UnexpectedStateException e) { - LOG.warn("Killing " + serverName + ": " + e.getMessage()); - killRegionServer(serverName); - throw (YouAreDeadException)new YouAreDeadException(e.getMessage()).initCause(e); + //See HBASE-21421, we can count on reportRegionStateTransition calls + //We only log a warming here. It could be a network lag. + LOG.warn("Failed to checkOnlineRegionsReport, maybe due to network lag, " + + "if this message continues, be careful of double assign", e); } } http://git-wip-us.apache.org/repos/asf/hbase/blob/5b8c7673/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRogueRSAssignment.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRogueRSAssignment.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRogueRSAssignment.java index afcf446..c88e583 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRogueRSAssignment.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestRogueRSAssignment.java @@ -45,6 +45,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -137,7 +138,11 @@ public class TestRogueRSAssignment { admin.setBalancerRunning(true, false); } + /** + * Ignore this test, see HBASE-21421 + */ @Test + @Ignore public void testReportRSWithWrongRegion() throws Exception { final TableName tableName = TableName.valueOf(this.name.getMethodName());