MDEV-32779 : galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()

I could not reproduce reported assertion. However, I could
reporoduce test failure because missing wait_condition
and error in test case. Added missing wait_condition and
fixed error in test case to make test stable.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
Jan Lindström 2024-11-05 09:24:09 +02:00 committed by Julius Goryavsky
parent f219fb8489
commit 8a32ae5d6d
3 changed files with 37 additions and 1 deletions

View file

@ -3,6 +3,7 @@ connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_1;
SET DEBUG_SYNC = 'wsrep_create_table_as_select WAIT_FOR continue';
CREATE table t1 as SELECT SLEEP(0.1);;
@ -17,14 +18,30 @@ connection node_1b;
SET SESSION debug_sync = 'now WAIT_FOR sync.wsrep_apply_cb_reached';
# Signal first CTAS to continue and wait until CTAS has executed
SET DEBUG_SYNC= 'now SIGNAL continue';
connection node_2b;
# Wait first CTAS to replicate
SELECT * FROM t1;
SLEEP(0.2)
0
connection node_1b;
SET GLOBAL debug_dbug= '';
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
connection node_2a;
connection node_1b;
SET DEBUG_SYNC= 'RESET';
connection node_2;
SELECT * FROM t1;
SLEEP(0.2)
0
connection node_1;
SELECT * FROM t1;
SLEEP(0.2)
0
DROP TABLE t1;
disconnect node_1a;
disconnect node_1b;
disconnect node_2a;
disconnect node_2b;
disconnect node_2;
disconnect node_1;
# End of test

View file

@ -0,0 +1,4 @@
[binlogoff]
[binlogon]
log-bin

View file

@ -9,6 +9,7 @@
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_1
#
@ -48,6 +49,14 @@ SET SESSION debug_sync = 'now WAIT_FOR sync.wsrep_apply_cb_reached';
SET DEBUG_SYNC= 'now SIGNAL continue';
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Creating table CREATE table t1 as SELECT SLEEP(0.1)'
--source include/wait_condition.inc
--connection node_2b
--echo # Wait first CTAS to replicate
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
--source include/wait_condition.inc
SELECT * FROM t1;
--connection node_1b
#
# Release second CTAS and cleanup
#
@ -74,12 +83,18 @@ SET DEBUG_SYNC= 'RESET';
#
--connection node_2
--reap
SELECT * FROM t1;
--connection node_1
--error 0,ER_TABLE_EXISTS_ERROR,ER_QUERY_INTERRUPTED
--error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK
--reap
SELECT * FROM t1;
DROP TABLE t1;
--disconnect node_1a
--disconnect node_1b
--disconnect node_2a
--disconnect node_2b
--source include/galera_end.inc
--echo # End of test