Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Incomplete
-
10.2.10, 10.2.12
-
3 galera nodes:
Mysql1
Mysql2
Mysql3
1 delay slave node:
Mysql4
Description
1.Setup replication on slave as follows, it works fine.
a) test 1 |
CHANGE MASTER 'Mysql1' TO master_host='Mysql1',master_user='replication',master_password='replication',master_use_gtid=slave_pos; |
|
b) test 2 |
CHANGE MASTER 'Mysql1' TO master_host='Mysql1',master_user='replication',master_password='replication',master_use_gtid=slave_pos,DO_DOMAIN_IDS=(10); |
|
c) test 3 |
CHANGE MASTER 'Mysql1' TO master_host='Mysql1',master_user='replication',master_password='replication',master_use_gtid=slave_pos,master_delay=10; |
2.Setup replication (DO_DOMAIN_IDS + master_delay) on slave, there is a problem with non-DO_DOMAIN_IDS when appling on slave.
#Mysql4 (Slave) , test 4 |
CHANGE MASTER 'Mysql1' TO master_host='Mysql1',master_user='replication',master_password='replication',master_use_gtid=slave_pos,DO_DOMAIN_IDS=(10),master_delay=10; |
|
#Mysql1 (Master)
|
create table test.a(a int) engine=innodb; |
create table test.b(a int) engine=myisam; |
|
watch -n 1 -e "mysql -uroot test -e \"insert into a select 1;insert into b select 1;select count(*) as a from a;select count(*) as b from b\"" |
|
#We can see that the GITDs of both domain 1 and domain 10 are growing |
$ mysql -uroot -e "show global variables like 'gtid_current_pos'"; sleep 5; mysql -uroot -e "show global variables like 'gtid_current_pos'" |
+------------------+------------------------+
|
| Variable_name | Value |
|
+------------------+------------------------+
|
| gtid_current_pos | *1-1-223546*,*10-1-233617* | |
+------------------+------------------------+
|
+------------------+------------------------+
|
| Variable_name | Value |
|
+------------------+------------------------+
|
| gtid_current_pos | *1-1-223551*,*10-1-233622* | |
+------------------+------------------------+
|
|
#Mysql4 (Slave)
|
#We can see that the GITD of domain 10 is growing normal, but GTID of domain 1 has been stopped. |
#If expire_logs_days is set on the master, slave will fail to restart after expire_logs_days days.
|
$ mysql -uroot -e "show all slaves status\G" | grep -i gtid; sleep 5; mysql -uroot -e "show all slaves status\G" | grep -i gtid |
Using_Gtid: Slave_Pos
|
Gtid_IO_Pos: *1-1-223742*,*10-1-233813*,2-2-105 |
Gtid_Slave_Pos: *1-1-223312*,2-2-105,*10-1-233803* |
Using_Gtid: Slave_Pos
|
Gtid_IO_Pos: *1-1-223747*,*10-1-233818*,2-2-105 |
Gtid_Slave_Pos: *1-1-223312*,2-2-105,*10-1-233808* |
3.Setup replication (DO_DOMAIN_IDS + master_delay + multi-master) on slave, will cause the query to slow down, such as, "show all slaves status; show global variables;" . And a few days later, slave has been killed by OOM killer in my UAT env.
#Mysql4 (Slave) , test 5 |
CHANGE MASTER 'Mysql1' TO master_host='Mysql1',master_user='replication',master_password='replication',master_use_gtid=slave_pos,DO_DOMAIN_IDS=(10),master_delay=10; |
CHANGE MASTER 'Mysql2' TO master_host='Mysql2',master_user='replication',master_password='replication',master_use_gtid=slave_pos,DO_DOMAIN_IDS=(10),master_delay=10; |
CHANGE MASTER 'Mysql3' TO master_host='Mysql3',master_user='replication',master_password='replication',master_use_gtid=slave_pos,DO_DOMAIN_IDS=(10),master_delay=10; |
|
#Mysql1 (Master)
|
create table test.a(a int) engine=innodb; |
create table test.b(a int) engine=myisam; |
|
watch -n 1 -e "mysql -uroot test -e \"insert into a select 1;insert into b select 1;select count(*) as a from a;select count(*) as b from b\"" |
|
#Mysql4 (Slave)
|
#"show all slaves status\G" is very very slow. |
> show all slaves status\G
|
...
|
3 rows in set (20.21 sec) |
|
> show global variables;
|
...
|
632 rows in set (16.52 sec) |
|