Commit fee138a1 authored by Jan Lindström's avatar Jan Lindström Committed by Julius Goryavsky

MDEV-31988 : galera_partition test: assertion due to unallowed state transition

Test case is starting too many servers that are not really
needed for original problem testing. This fix reduces
number of servers to make test case smaller and more
robust.
Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
parent 632a503c
......@@ -3,8 +3,6 @@ connection node_1;
connection node_1;
call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*");
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_1;
CREATE TABLE t1(
id bigint unsigned NOT NULL AUTO_INCREMENT,
......@@ -396,33 +394,24 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
SELECT COUNT(*) FROM t1;
COUNT(*)
350
connection node_2;
call mtr.add_suppression("WSREP: Sending JOIN failed:");
call p1(10);
connection node_3;
call mtr.add_suppression("WSREP: Sending JOIN failed:");
call p1(10);
connection node_4;
call mtr.add_suppression("WSREP: Sending JOIN failed:");
call p1(10);
connection node_1;
call p1(10);;
connection node_2;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
SET SESSION wsrep_OSU_method='RSU';
SELECT @@wsrep_OSU_method;
@@wsrep_OSU_method
RSU
SET SESSION sql_log_bin = 0;
ALTER TABLE t1 DROP PARTITION rx2009xx;
ALTER TABLE t1 DROP PARTITION rx201004;
ALTER TABLE t1 DROP PARTITION rx201008;
SET SESSION wsrep_OSU_METHOD='TOI';
SET SESSION sql_log_bin = 1;
SELECT @@wsrep_OSU_method;
@@wsrep_OSU_method
TOI
connection node_2;
connection node_3;
connection node_4;
disconnect node_2a;
connection node_1;
connection node_1;
DROP TABLE t1;
DROP PROCEDURE p1;
disconnect node_3;
disconnect node_4;
!include ../galera_4nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
wsrep_debug=1
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
wsrep_debug=1
[mysqld.3]
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2'
wsrep_slave_threads=10
wsrep_debug=1
[mysqld.4]
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3'
wsrep_slave_threads=10
wsrep_debug=1
--source include/galera_cluster.inc
--source include/have_partition.inc
--source include/big_test.inc
--source include/force_restart.inc
--connection node_1
call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*");
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
CREATE TABLE t1(
......@@ -408,50 +406,37 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
SELECT COUNT(*) FROM t1;
--connection node_2
call mtr.add_suppression("WSREP: Sending JOIN failed:");
send call p1(10);
--connection node_3
call mtr.add_suppression("WSREP: Sending JOIN failed:");
send call p1(10);
--connection node_1
--send call p1(10);
--connection node_4
call mtr.add_suppression("WSREP: Sending JOIN failed:");
send call p1(10);
--connection node_2
--connection node_1
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
SET SESSION wsrep_OSU_method='RSU';
SELECT @@wsrep_OSU_method;
SET SESSION sql_log_bin = 0;
--error 0,ER_LOCK_DEADLOCK
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 DROP PARTITION rx2009xx;
--error 0,ER_LOCK_DEADLOCK
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 DROP PARTITION rx201004;
--error 0,ER_LOCK_DEADLOCK
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 DROP PARTITION rx201008;
SET SESSION wsrep_OSU_METHOD='TOI';
SET SESSION sql_log_bin = 1;
SELECT @@wsrep_OSU_method;
--connection node_2
--error 0,ER_LOCK_DEADLOCK
reap;
--disconnect node_2a
--connection node_3
--error 0,ER_LOCK_DEADLOCK
reap;
--connection node_4
--error 0,ER_LOCK_DEADLOCK
--connection node_1
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT
reap;
--connection node_1
DROP TABLE t1;
DROP PROCEDURE p1;
--disconnect node_3
--disconnect node_4
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