Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6.20
-
None
-
None
Description
One of my EA customers is using MariaDB Clusters and recently they just started to use 10.6.20 CS. Their typical architecture is to set up two MariaDB Clusters (Primary & Secondary) and configure bi-directional async replication between them. There’s no simultaneous write operations on both clusters so secondary clusters usually just sit there for DR purpose.
They reported me that they found some unexpected GTID# which they didn’t find with the previous versions and they requested to check if there’s architecture change and make sure if it’s OK. AFAIK It didn’t affect their service yet but they are monitoring GTID# for various reasons and want to make sure about it.
It can be easily reproduced with a circular replication setup between two MariaDB Clusters.
I’ve set up Primary clusters (Node1 & Node2) & Secondary clusters (Node4) in my desktop and configured circular replication between Node2 and Node4.
After I’ve made some updates on the clusters, I could see some funky GTID# (10-0-47) only on Node1 which I didn’t configure.
This is the configuration I've set.
-
- Primary Cluster (Node1 & 2)
wsrep_gtid_domain_id = 10
server_id = 1000
- Primary Cluster (Node1 & 2)
-
- Secondary Cluster (Node4)
wsrep_gtid_domain_id = 70
server_id = 7000
- Secondary Cluster (Node4)
So the GTID supposed to increase like this...
In Primary: 10-1000-x
In Secondary: 70-7000-x
At first, GTID increased what I expected above until "10-1000-47" and gtid_current_pos showed correct value.
MariaDB [d1]> show variables like '%gtid%';
---------------------------------------------+
Variable_name | Value |
---------------------------------------------+
gtid_binlog_pos | 10-1000-47,70-7000-7 | <===== |
gtid_binlog_state | 10-1000-47,70-7000-7 | <===== |
gtid_cleanup_batch_size | 64 | |
gtid_current_pos | 10-1000-47 | <===== |
gtid_domain_id | 1001 | |
gtid_ignore_duplicates | ON | |
gtid_pos_auto_engines | ||
gtid_seq_no | 0 | |
gtid_slave_pos | ||
gtid_strict_mode | OFF | |
last_gtid | 10-1000-45 | |
wsrep_gtid_domain_id | 10 | |
wsrep_gtid_mode | ON | |
wsrep_gtid_seq_no | 0 |
---------------------------------------------+
14 rows in set (0.001 sec)
But after I've inserted 1 row on the Node1 and the GTID in Node1 changed.
MariaDB [d1]> insert into t1 (name) values ("KDFJLIEKJRLKDJLSF");
Query OK, 1 row affected (0.002 sec)
MariaDB [d1]> show variables like '%gtid%';
-----------------------------------------------------+
Variable_name | Value |
-----------------------------------------------------+
gtid_binlog_pos | 10-0-47,70-7000-7 | <===== |
gtid_binlog_state | 10-1000-48,10-0-47,70-7000-7 | <===== |
gtid_cleanup_batch_size | 64 | |
gtid_current_pos | <===== | |
gtid_domain_id | 1001 | |
gtid_ignore_duplicates | ON | |
gtid_pos_auto_engines | ||
gtid_seq_no | 0 | |
gtid_slave_pos | ||
gtid_strict_mode | OFF | |
last_gtid | 10-1000-48 | |
wsrep_gtid_domain_id | 10 | |
wsrep_gtid_mode | ON | |
wsrep_gtid_seq_no | 0 |
-----------------------------------------------------+
14 rows in set (0.001 sec)
What I observed is that...
1) In "gtid_binlog_pos", 10-1000-48 was expected but 10-0-47 showed up.
2) In "gtid_binlog_state", 10-0-47 was added.
3) gtid_current_pos value is gone.
Other nodes' GTID seems normal below.
-
- Node2
MariaDB [(none)]> show variables like '%gtid%';
---------------------------------------------+Variable_name Value ------------------------
---------------------+gtid_binlog_pos 10-1000-48,70-7000-7 gtid_binlog_state 10-1000-48,70-7000-7 gtid_cleanup_batch_size 64 gtid_current_pos 10-1000-48,70-7000-7 gtid_domain_id 1002 gtid_ignore_duplicates ON gtid_pos_auto_engines gtid_seq_no 0 gtid_slave_pos 10-1000-48,70-7000-7 gtid_strict_mode OFF last_gtid wsrep_gtid_domain_id 10 wsrep_gtid_mode ON wsrep_gtid_seq_no 0 ------------------------
---------------------+
14 rows in set (0.001 sec)
- Node2
-
- Node4
MariaDB [(none)]> show variables like '%gtid%';
---------------------------------------------+Variable_name Value ------------------------
---------------------+gtid_binlog_pos 10-1000-48,70-7000-7 gtid_binlog_state 10-1000-48,70-7000-7 gtid_cleanup_batch_size 64 gtid_current_pos 10-1000-48,70-7000-7 gtid_domain_id 1004 gtid_ignore_duplicates ON gtid_pos_auto_engines gtid_seq_no 0 gtid_slave_pos 10-1000-48,70-7000-7 gtid_strict_mode OFF last_gtid wsrep_gtid_domain_id 70 wsrep_gtid_mode ON wsrep_gtid_seq_no 0 ------------------------
---------------------+
14 rows in set (0.001 sec)
- Node4