diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-05-14 10:50:49 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-05-17 08:29:45 +0300 |
commit | c84f390df20c9fa385351d3f21a6f0f48dde1803 (patch) | |
tree | e65e308a01c52a62ad3d4f663df81fd49bcca9d2 /mysql-test/suite/galera_3nodes | |
parent | 61469b3a3b01d9491f17f58c4bd34a33150efcb3 (diff) | |
download | mariadb-git-c84f390df20c9fa385351d3f21a6f0f48dde1803.tar.gz |
MDEV-16021: galera mtr test galera_evs_suspect_timeout crashed
Crash was timeout crash. Add correct waits for connections, wsrep
sync waits and auto increment offset save and restore.
Diffstat (limited to 'mysql-test/suite/galera_3nodes')
-rw-r--r-- | mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result | 21 | ||||
-rw-r--r-- | mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test | 48 |
2 files changed, 44 insertions, 25 deletions
diff --git a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result index 7e0d282ec7f..833d045f274 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result +++ b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result @@ -1,20 +1,25 @@ SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S'; SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S'; Suspending node ... -SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_sync_wait=0; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -CREATE TABLE t1 (f1 INTEGER); +CREATE TABLE t1 (f1 INTEGER) engine=InnoDB; INSERT INTO t1 VALUES (1); -SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_sync_wait=0; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 -SET SESSION wsrep_sync_wait = DEFAULT; -SELECT COUNT(*) = 1 FROM t1; -COUNT(*) = 1 +SET SESSION wsrep_sync_wait = 15; +SELECT COUNT(*) FROM t1; +COUNT(*) 1 -DROP TABLE t1; Resuming node ... -CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)"); +CALL mtr.add_suppression("WSREP: gcs_caused.*"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg.*"); +SET SESSION wsrep_sync_wait = 15; +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test index 03236a3cb93..298613b3596 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test +++ b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test @@ -7,24 +7,28 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +--let $galera_connection_name = node_3 +--let $galera_server_number = 3 +--source include/galera_connect.inc +--let $wsrep_cluster_address_node3 = `SELECT @@wsrep_cluster_address` + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--let $node_3=node_3 +--source ../galera/include/auto_increment_offset_save.inc + --connection node_1 --let $wsrep_provider_options_node1 = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S'; --connection node_2 ---source include/wait_until_connected_again.inc --let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S'; ---let $galera_connection_name = node_3 ---let $galera_server_number = 3 ---source include/galera_connect.inc ---connection node_3 ---source include/wait_until_connected_again.inc ---let $wsrep_cluster_address_node3 = `SELECT @@wsrep_cluster_address` - # Suspend node #3 +--connection node_3 --source include/galera_suspend.inc --sleep 5 @@ -32,27 +36,27 @@ SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_ti --connection node_1 --source include/wait_until_connected_again.inc -SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_sync_wait=0; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --disable_query_log --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node1'; --enable_query_log - --source include/wait_until_connected_again.inc -CREATE TABLE t1 (f1 INTEGER); + +CREATE TABLE t1 (f1 INTEGER) engine=InnoDB; INSERT INTO t1 VALUES (1); --connection node_2 -SET SESSION wsrep_sync_wait = 0; +--source include/wait_until_connected_again.inc +SET SESSION wsrep_sync_wait=0; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --disable_query_log --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node2'; --enable_query_log - --source include/wait_until_connected_again.inc -SET SESSION wsrep_sync_wait = DEFAULT; -SELECT COUNT(*) = 1 FROM t1; -DROP TABLE t1; + +SET SESSION wsrep_sync_wait = 15; +SELECT COUNT(*) FROM t1; # Reconnect node #3 so that MTR's end-of-test checks can run @@ -60,9 +64,19 @@ DROP TABLE t1; --source include/galera_resume.inc --source include/wait_until_connected_again.inc -CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)"); +CALL mtr.add_suppression("WSREP: gcs_caused.*"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg.*"); --disable_query_log --eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node3'; --enable_query_log --source include/wait_until_connected_again.inc + +SET SESSION wsrep_sync_wait = 15; +SELECT COUNT(*) FROM t1; + +--connection node_1 +DROP TABLE t1; +# Restore original auto_increment_offset values. +--source ../galera/include/auto_increment_offset_restore.inc + |