From 0a8e2067d28c3b550b959313877a806d74af07e4 Mon Sep 17 00:00:00 2001 From: shahrs87 Date: Wed, 21 Aug 2019 06:56:04 -0700 Subject: [PATCH] HBASE-22601 Misconfigured addition of peers leads to cluster shutdown. (#500) Signed-off-by: Duo Zhang --- .../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 b4c9ad36db8..573f5734a47 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 @@ -511,6 +511,10 @@ public class ReplicationSource implements ReplicationSourceInterface { } } + 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()) {