You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2019/08/21 13:56:09 UTC

[hbase] branch branch-2 updated: HBASE-22601 Misconfigured addition of peers leads to cluster shutdown. (#500)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 0a1950f  HBASE-22601 Misconfigured addition of peers leads to cluster shutdown. (#500)
0a1950f is described below

commit 0a1950f43cbf26ce5386c8a12d7f774c3e25e04f
Author: shahrs87 <sh...@gmail.com>
AuthorDate: Wed Aug 21 06:56:04 2019 -0700

    HBASE-22601 Misconfigured addition of peers leads to cluster shutdown. (#500)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../hadoop/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 8d0e661..41a4e7b 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
@@ -510,6 +510,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()) {