From bb87e3a7bf161c87e838ed4d3eb176f588383bb1 Mon Sep 17 00:00:00 2001 From: shahrs87 Date: Thu, 22 Aug 2019 13:04:23 -0700 Subject: [PATCH] [HBASE-22601] Misconfigured addition of peers leads to cluster shutdown. (#490) Signed-off-by: Andrew Purtell --- .../hbase/replication/regionserver/ReplicationSource.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index c7780bb32c63..124da63b9fcb 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -310,6 +310,10 @@ public void run() { } } + if (!this.isSourceActive()) { + return; + } + // In rare case, zookeeper setting may be messed up. That leads to the incorrect // peerClusterId value, which is the same as the source clusterId if (clusterId.equals(peerClusterId) && !replicationEndpoint.canReplicateToSameCluster()) {