# Master-Master Replication between PXCs

**URL:** <https://forums.percona.com/t/master-master-replication-between-pxcs/6280>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [April 3, 2018, 10:31am UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280 "2018-04-03T10:31:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MySQLDBA2007](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@MySQLDBA2007](https://forums.percona.com/u/MySQLDBA2007)\
**Post date:** [April 3, 2018, 10:31am UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/1 "2018-04-03T10:31:36Z")

</div>

Hi,

Seeing a lot of these:  
[COLOR=#B22222][Warning] WSREP: Pending to replicate MySQL GTID event (probably a stale event). Discarding it now.

PXC is Ver 5.7.21-20-57 for debian-linux-gnu on x86\_64 (Percona XtraDB Cluster (GPL))

Transactions going into D1, C1, E1, F1 shows up in all PXC nodes. This is great.  
Transactions going into A1/B1 does not show up in other/all PXC nodes.  
server-id, wsrep node/name/ip are unique per node  
wsrep cluster name is unique per cluster.  
see attached picture for arch.  
Please let me know if this arch works at all or if I am chasing a wild goose. Appreciate it.

![photoid=51222](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/f/f38e41dc494d0c6e2a73109abcb27c3e997aa024.png)

---

<div class="post-metadata">

**Author:** ![MySQLDBA2007](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@MySQLDBA2007](https://forums.percona.com/u/MySQLDBA2007)\
**Post date:** [April 3, 2018, 6:39pm UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/2 "2018-04-03T18:39:17Z")

</div>

Same story with the following arch too.

----------E1 (Percona Server Server)  
----------| (Async Master - Master setup)  
----------|------F1 (Percona Server Server)  
----------|-------| (Async Master - Master setup)  
A1\<-\>A2\<-\>A3 (PXC)  
| (Async Master - Master setup)  
B1\<-\>B2\<-\>B3 (PXC)  
---------|--------| (Async Master - Master setup)  
---------|-------C1 (Percona Server Server)  
---------| (Async Master - Master setup)  
--------D1 (Percona Server Server)

Only hint is [COLOR=#FF0000][Warning] WSREP: Pending to replicate MySQL GTID event (probably a stale event). Discarding it now. Can’t get my head around this.

---

<div class="post-metadata">

**Author:** ![MySQLDBA2007](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@MySQLDBA2007](https://forums.percona.com/u/MySQLDBA2007)\
**Post date:** [April 5, 2018, 1:15am UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/3 "2018-04-05T01:15:39Z")

</div>

Experts, you guys only need to confirm what this means…:

[COLOR=#FF0000][Warning] WSREP: Pending to replicate MySQL GTID event (probably a stale event). Discarding it now.

So far, I can confirm the data is flowing fine between both archs.

---

<div class="post-metadata">

**Author:** ![krunalbauskar](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@krunalbauskar](https://forums.percona.com/u/krunalbauskar)\
**Post date:** [April 5, 2018, 4:59am UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/4 "2018-04-05T04:59:10Z")

</div>

Let me see if I understood your setup correctly

1. You have 6 pxc-cluster in all named as A, B, C, D, E, F

2. Each cluster has 3 nodes

3. Cluster A and B master-master relationship.  
(what does this mean? does it mean all these 6 nodes form a single big cluster)

4. Now, each of the remaining cluster C, D, E, F are connected to either of the nodes from A or B.  
[Relationship here is async master-master. Again? what is async master-master? 2-way master-slave link ?]

* * *

Possible cause:

- Is log-slave-updates set on all the nodes of the cluster

- Also as per one such already filed bug (PXC-2042), user suspect use of binlog\_format=MIXED causing the issue. Do you have the same setting.

---

<div class="post-metadata">

**Author:** ![MySQLDBA2007](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@MySQLDBA2007](https://forums.percona.com/u/MySQLDBA2007)\
**Post date:** [April 9, 2018, 8:03pm UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/5 "2018-04-09T20:03:32Z")

</div>

Hi [krunalbauskar](https://www.percona.com/forums/member/27214-krunalbauskar),

A1\<-\>B1 are master-master. A1,A2,A3 are in same cluster {PXC}. B1,B2,B3 are in another cluster {PXC}.

Yes, log-slave-updates set on all the nodes of the cluster. Need this to allow writes that needs to get replicated.

binlog\_format=ROW as PXC/galera recommends and works.

On a side note: Does Percona-server-server-5.7 support multi-source replication yet? In the above setup, the footprint to support each remote location is high. EG: each node in the cluster is a master master with a remote Percona-server-server-5.7. Hoping to see multi-source replication in Percona releases sooner than later.

Thank you.

---

<div class="post-metadata">

**Author:** ![krunalbauskar](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@krunalbauskar](https://forums.percona.com/u/krunalbauskar)\
**Post date:** [April 12, 2018, 10:29pm UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/6 "2018-04-12T22:29:59Z")

</div>

Sorry but I still don’t understand what master-master relationship among 2 PXC clusters.

PS-5.7 should have multi-source replication support as MySQL 5.7 added it.  
Do you see any issue using it?

---

<div class="post-metadata">

**Author:** ![MySQLDBA2007](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@MySQLDBA2007](https://forums.percona.com/u/MySQLDBA2007)\
**Post date:** [April 23, 2018, 12:35pm UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/7 "2018-04-23T12:35:30Z")

</div>

Hi [krunalbauskar](https://www.percona.com/forums/member/27214-krunalbauskar),

Good to know that multi-source replication is ported to PS-5.7.

Thanks for your responses.

---

<div class="post-metadata">

**Author:** ![10101000](https://avatars.discourse-cdn.com/v4/letter/1/e274bd/32.png) [@10101000](https://forums.percona.com/u/10101000)\
**Post date:** [May 11, 2018, 5:25pm UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/8 "2018-05-11T17:25:04Z")

</div>

Hi, we’ve experienced this same issue while configuring asynchronous bi-directional (master \<-\> master) MySQL replication between two independent PXC clusters. The solution was to set the same server-id for each host per-cluster. Cluster 1 with 3 members all use server-id 1, cluster 2 with 3 members all use server-id 2. This is required to avoid a replication loop. Now MySQL async replication can ignore transactions that have already been replicated.

---

<div class="post-metadata">

**Author:** ![shredder12](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@shredder12](https://forums.percona.com/u/shredder12)\
**Post date:** [April 22, 2019, 12:20pm UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/9 "2019-04-22T12:20:46Z")

</div>

Hi [krunalbauskar](https://percona.vanillacommunities.com/profile/x/x/27214) I am noticing this behavior too. We have two PXC clusters, say A and B. A node in cluster B, B1-1, is an async slave of a node in A, A1-1. The following warning messages floods mysql’s error log on B1-1. These messages stop as soon as sql\_thread is stopped and continue when slave is started again.

```auto
[Warning] WSREP: Pending to replicate MySQL GTID event (probably a stale event). Discarding it now.

```

We are running PXC 5.7.24. The async replication is not using GTID. This behavior is evident across two different deployments of the same architecture, async master-slave replication b/w two PXC clusters.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![lalit.choudhary](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lalit.choudhary/32/51_2.png) [@lalit.choudhary](https://forums.percona.com/u/lalit.choudhary)\
**Post date:** [February 18, 2020, 9:17am UTC](https://forums.percona.com/t/master-master-replication-between-pxcs/6280/10 "2020-02-18T09:17:22Z")

</div>

Related PXC Bug: [URL][[PXC-2591] Percona cluster with async gtid replication - Percona JIRA](https://jira.percona.com/browse/PXC-2591%5B/URL%5D)
