mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 09:44:17 +01:00
MDEV-32633: Fix Galera cluster <-> native replication interaction
GTID events are applied without a running server transaction, we need to set next transaction ID for Wsrep transaction. The whole Galera cluster now has a single GTID value (including the server ID throughout the cluster), fix the config accordingly. Add force restart so that repeated MTR test execution prints consistent GTID values, otherwise they would have been recovered from the previous run. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
parent
0cc9b49751
commit
a4838721a2
3 changed files with 129 additions and 4 deletions
mysql-test/suite/galera_3nodes
|
@ -166,6 +166,55 @@ cluster_domain_id node_server_id seq_no
|
|||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
# check other nodes are consistent
|
||||
connection node_2;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-4,2-21-3
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
connection node_3;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-4,2-21-3
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
connection node_5;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-4,2-21-3
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
connection node_6;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-4,2-21-3
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
cluster 1 node 1
|
||||
connection node_1;
|
||||
select @@gtid_binlog_state;
|
||||
|
@ -337,6 +386,55 @@ cluster_domain_id node_server_id seq_no
|
|||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
# check other nodes are consistent
|
||||
connection node_2;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-9,2-21-6
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
connection node_3;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-9,2-21-6
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
connection node_5;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-9,2-21-6
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
connection node_6;
|
||||
select @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-11-9,2-21-6
|
||||
select * from t1 order by 1, 2, 3;
|
||||
cluster_domain_id node_server_id seq_no
|
||||
1 11 2
|
||||
1 12 3
|
||||
1 13 4
|
||||
2 21 1
|
||||
2 22 2
|
||||
2 23 3
|
||||
cluster 1 node 1
|
||||
connection node_1;
|
||||
select @@gtid_binlog_state;
|
||||
|
|
|
@ -9,11 +9,11 @@ server-id=11
|
|||
|
||||
[mysqld.2]
|
||||
wsrep_gtid_domain_id=1
|
||||
server-id=12
|
||||
server-id=11
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_gtid_domain_id=1
|
||||
server-id=13
|
||||
server-id=11
|
||||
|
||||
[mysqld.4]
|
||||
wsrep_gtid_domain_id=2
|
||||
|
@ -21,8 +21,8 @@ server-id=21
|
|||
|
||||
[mysqld.5]
|
||||
wsrep_gtid_domain_id=2
|
||||
server-id=22
|
||||
server-id=21
|
||||
|
||||
[mysqld.6]
|
||||
wsrep_gtid_domain_id=2
|
||||
server-id=23
|
||||
server-id=21
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--connection node_1
|
||||
--echo cluster 1 node 1
|
||||
|
@ -135,6 +136,19 @@ select @@gtid_binlog_state;
|
|||
--source include/sync_with_master_gtid.inc
|
||||
select * from t1 order by 1, 2, 3;
|
||||
|
||||
--echo # check other nodes are consistent
|
||||
--connection node_2
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
--connection node_3
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
--connection node_5
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
--connection node_6
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
|
||||
--echo cluster 1 node 1
|
||||
--connection node_1
|
||||
|
@ -291,6 +305,19 @@ select @@gtid_binlog_state;
|
|||
--source include/sync_with_master_gtid.inc
|
||||
select * from t1 order by 1, 2, 3;
|
||||
|
||||
--echo # check other nodes are consistent
|
||||
--connection node_2
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
--connection node_3
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
--connection node_5
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
--connection node_6
|
||||
select @@gtid_binlog_state;
|
||||
select * from t1 order by 1, 2, 3;
|
||||
|
||||
--echo cluster 1 node 1
|
||||
--connection node_1
|
||||
|
|
Loading…
Add table
Reference in a new issue