From 61a3a9ffbb997c2c0ca81789252d07f99e14df2e Mon Sep 17 00:00:00 2001 From: shahrs87 Date: Wed, 21 Aug 2019 06:52:50 -0700 Subject: [PATCH] HBASE-22601 Misconfigured addition of peers leads to cluster shutdown. (#499) 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 7e36d625c02..948c24dc4f8 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 @@ -504,6 +504,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()) {