Register and ask your own question!
Can the slave of pxc change master to another memeber of the cluster just by use auto_position?
I once read an article( https://www.percona.com/blog/2013/06/21/changing-an-async-slave-of-a-pxc-cluster-to-a-new-master/)this article roughly means: if there is a pxc cluster, it contains three nodes p1 p2 p3, p1 has a slave s1.
if we want to change s1's master to p2 , we must analyze the binlog of p1 and p2 to find the file pos corresponding to the same xid
But what if we turn on GTID? I read some books(chinese books) said that I still need to use xid and can not just use change master auto_position=1
The steps are probably:
1.get pxc cluster's uuid, get execute_gtid_set on s1: "uuid:100"
2.use the gtid "uuid:100" to find the xid in p1's binlog
3.use the xid to find gtid in p2's binlog ,such as: "uuid:105"
4.on s1 reset master, set gtid_purged=uuid:105
5.change mastet to p2 auto_position=1
The above steps are very unfriendly, especially when using downstream consumer components(CDC) such as canal, debezium
My question is in version 5.7.30, do I still need to do this?
My English is not very good, please forgive me