HBASE-4654 [replication] Add a check to make sure we don't replicate to ourselves (Demai)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1541279 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
60ad668311
commit
4837c424f3
|
@ -212,6 +212,12 @@ public class ReplicationSource extends Thread
|
|||
// resetting to 1 to reuse later
|
||||
sleepMultiplier = 1;
|
||||
|
||||
// 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)) {
|
||||
this.terminate("ClusterId " + clusterId + " is replicating to itself: peerClusterId "
|
||||
+ peerClusterId);
|
||||
}
|
||||
LOG.info("Replicating "+clusterId + " -> " + peerClusterId);
|
||||
|
||||
// If this is recovered, the queue is already full and the first log
|
||||
|
|
Loading…
Reference in New Issue