From 91b1f6939415960e329efb43b839bbbf63e747c5 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 8b4af7911808..ad3e0d1cf2db 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 @@ private void initialize() { } } + 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()) {