[ 
https://issues.apache.org/jira/browse/HBASE-24743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17344328#comment-17344328
 ] 

Anoop Sam John commented on HBASE-24743:
----------------------------------------

I too hit this issue with a customer recently. Thought of raising this and 
happened to see this issue today. Good one.
Also in such case, the addPeer as such got succeeded. List peer call lists it.  
But actual data replication was not happening as RS side peer add did not 
happen.  Later when this peer is removed, the removePeer procedure could not 
complete.  As part of that, the refreshPeer in RS side throw NPE and those 
procedures never getting finished.    

> Reject to add a peer which replicate to itself earlier
> ------------------------------------------------------
>
>                 Key: HBASE-24743
>                 URL: https://issues.apache.org/jira/browse/HBASE-24743
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>            Priority: Major
>             Fix For: 3.0.0-alpha-1, 2.4.0
>
>
> Now there are one check in ReplicationSource#initialize method
> {code:java}
> // 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()) {
>   this.terminate("ClusterId " + clusterId + " is replicating to itself: 
> peerClusterId "
>       + peerClusterId + " which is not allowed by ReplicationEndpoint:"
>       + replicationEndpoint.getClass().getName(), null, false);
>   this.manager.removeSource(this);
>   return;
> }
> {code}
> This check should move to AddPeerProcedure's precheck.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to