Hello,
I’m trying to change those ids on an existing cluster, but can’t manage to make it work properly, and would like some help:
Context:
- a 3-nodes Galera cluster in production, receiving read/write traffic
- using MariaDB v10.11
- config:
server_id=10,gtid_domain_id=100,wsrep_gtid_domain_id=1000,wsrep_gtid_mode=ON (on all 3 nodes) - no (async) replica at all
Goal
(Long-term goal, not the objective of this message): I want to setup a partial async replication from Galera cluster A to Galera cluster B, in order to perform a no-downtime migration of some tables and reorganize our data.
But both clusters have the same server_id & domain ids, which is a blocker to the replication according to mariadb’s doc.
Thus my current goal of changing server & domain ids to different values on the target cluster (B).
But my tests in an isolated env are not working properly: the generated gtid still use the old ids.
What I already tested
Test 1:
SET GLOBAL wsrep_gtid_domain_id = 2000; -- on all 3 nodes
=> param accepted, and almost ok:
SHOW GLOBAL VARIABLES WHERE Variable_name IN ('wsrep_gtid_domain_id',
'gtid_current_pos', 'gtid_binlog_pos', 'gtid_binlog_state')"
+----------------------+-------------------------------------+
| Variable_name | Value |
+----------------------+-------------------------------------+
| gtid_binlog_pos | 100-10-28,1000-10-1928,2000-10-3870 |
| gtid_binlog_state | 100-10-28,1000-10-1928,2000-10-3870 |
| gtid_current_pos | |
| wsrep_gtid_domain_id | 2000 |
+----------------------+-------------------------------------+
=> new (2000) gtid domain added & increases, and the old one (1000) stays there, constant ![]()
=> only strange thing: the gtid_current_pos is not filled anymore
Do you know why ? Is it important ?
Test 2:
SET GLOBAL server_id = 20; -- on all 3 nodes
=> refused: Can't change server_id because wsrep and wsrep_gtid_mode is set. You can set server_id only with wsrep_new_cluster.
=> impossible to change the server_id without re-bootstraping the whole cluster ?
Idea 3:
Not tested yet, but thinking about: disabling wsrep_gtid_mode temporarily, then change server_id & domain-id, and enabling wsrep_gtid_mode back.
Could it be a good idea ?
Conclusion
I welcome any help to guide me into performing those change of ids safely ![]()
Thanks !