Skip to content

Commit

Permalink
MDEV-24481 : galera_3nodes.galera_vote_rejoin_mysqldump MTR failed: m…
Browse files Browse the repository at this point in the history
…ysql_shutdown failed

Improve test case to wait until cluster membership is
correct.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
  • Loading branch information
janlindstrom authored and sysprg committed Dec 20, 2023
1 parent 2b8c59f commit cfaab61
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
1 change: 0 additions & 1 deletion mysql-test/suite/galera_3nodes/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

galera_2_cluster : MDEV-32631 galera_2_cluster: before_rollback(): Assertion `0' failed
galera_gtid_2_cluster : MDEV-32633 galera_gtid_2_cluster: Assertion `thd->wsrep_next_trx_id() != (0x7fffffffffffffffLL * 2ULL + 1)'
galera_vote_rejoin_mysqldump : MDEV-24481: galera_3nodes.galera_vote_rejoin_mysqldump MTR failed: mysql_shutdown failed
galera_ssl_reload : MDEV-32778 galera_ssl_reload failed with warning message
galera_ipv6_mariabackup : temporarily disabled at the request of Codership
galera_pc_bootstrap : temporarily disabled at the request of Codership
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ SELECT VARIABLE_VALUE AS expect_Disconnected FROM INFORMATION_SCHEMA.GLOBAL_STAT
expect_Disconnected
Disconnected
SET SESSION wsrep_on=ON;
SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
expect_3
3
SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
expect_Primary
Primary
Expand All @@ -49,17 +52,11 @@ t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection node_2;
SET SESSION wsrep_on=OFF;
SET SESSION wsrep_on=ON;
# restart
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
CALL mtr.add_suppression("is inconsistent with group");
connection node_3;
SHOW CREATE TABLE t1;
Expand All @@ -81,3 +78,6 @@ CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
connection node_2;
# restart
connection node_1;
21 changes: 10 additions & 11 deletions mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ SET SESSION wsrep_on=ON;
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';

# Confirm that the table is now identical throughout
Expand All @@ -67,18 +68,7 @@ SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WH
SHOW CREATE TABLE t1;

--connection node_2
SET SESSION wsrep_on=OFF;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
--source include/galera_wait_ready.inc
SET SESSION wsrep_on=ON;

# restart node so we don't fail on WSREP_START_POSITION internal check
--source include/restart_mysqld.inc
--source include/wait_until_connected_again.inc

SHOW CREATE TABLE t1;
SELECT COUNT(*) AS expect_0 FROM t1;
CALL mtr.add_suppression("is inconsistent with group");

--connection node_3
Expand All @@ -89,5 +79,14 @@ CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that col
--connection node_1
--source suite/galera/include/galera_sst_restore.inc

--connection node_2
# restart node so we don't fail on WSREP_START_POSITION internal check
--source include/restart_mysqld.inc
--source include/wait_until_connected_again.inc

--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc

0 comments on commit cfaab61

Please sign in to comment.