1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix sporadic test failure on galera_parallel_apply_3nodes.

Test itself is not deterministic.
This commit is contained in:
Jan Lindström
2020-10-30 09:19:29 +02:00
parent a90b15837c
commit 5482d62760
2 changed files with 25 additions and 7 deletions

View File

@ -7,12 +7,18 @@ UPDATE t1 SET f1 = f1 + 10;;
connection node_2;
UPDATE t1 SET f1 = f1 + 100;;
connection node_1;
connection node_2;
connection node_3;
SELECT f1 = 111 FROM t1;
f1 = 111
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
connection node_3;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
COUNT(*) IN (1, 2)
1
SET GLOBAL wsrep_slave_threads = 1;;

View File

@ -24,14 +24,26 @@ SET GLOBAL wsrep_slave_threads = 2;
--send UPDATE t1 SET f1 = f1 + 100;
--connection node_1
#
# Note that test is not deterministic. We have following cases possible
# (1) Both updates are certified locally and then executed by the applier
# (2) Certification of update in node_1 fails because applier has started
# update from node_2
# (3) Certification of update in node_2 fails because applier has started
# update from node_1
#
--error 0,ER_LOCK_DEADLOCK
--reap
SELECT COUNT(*) FROM t1;
--connection node_2
--error 0,ER_LOCK_DEADLOCK
--reap
SELECT COUNT(*) FROM t1;
--connection node_3
SELECT f1 = 111 FROM t1;
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;