Commit f8ea96b8 authored by Teemu Ollakka's avatar Teemu Ollakka Committed by Jan Lindström

codership/galera#500 MTR test for proper Galera provider tear down

Added a test which verifies that if the gcomm background thread
is forced to quit via exception, the error is propagated all the
way up the stack and wsrep_ready becomes 0.
parent 7274bed2
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options="gmcast.isolate=2";
SET SESSION wsrep_sync_wait = 0;
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
SET SESSION wsrep_sync_wait = default;
SET GLOBAL wsrep_provider_options="pc.bootstrap=1";
SET SESSION wsrep_on=0;
CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
#
# The purpose of this test is to verify that if an exception is
# thrown from gcomm background thread, the provider terminates properly
# and wsrep_ready becomes 0.
#
--source include/have_innodb.inc
--source include/galera_cluster.inc
# Force node_2 gcomm background thread to terminate via exception.
--connection node_2
--let $wsrep_cluster_address = `SELECT @@wsrep_cluster_address`
# Setting gmcast.isolate=2 will force gcomm background thread to
# throw exception.
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options="gmcast.isolate=2";
# Wait until wsrep_ready becomes 0.
--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_ready'
--source include/wait_condition.inc
# Wait until node_1 ends up in non-prim and rebootstrap the cluster.
--connection node_1
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_cluster_size'
--source include/wait_condition.inc
SHOW STATUS LIKE 'wsrep_cluster_status';
SET SESSION wsrep_sync_wait = default;
SET GLOBAL wsrep_provider_options="pc.bootstrap=1";
# Restart node_2
--connection node_2
SET SESSION wsrep_on=0;
--source include/restart_mysqld.inc
--connection node_2
CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment