Skip to content
Permalink
Browse files
Fix sporadic test failure on galera_parallel_apply_3nodes.
Test itself is not deterministic.
  • Loading branch information
Jan Lindström committed Oct 30, 2020
1 parent a90b158 commit 5482d62
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
@@ -7,12 +7,18 @@ UPDATE t1 SET f1 = f1 + 10;;
connection node_2;
UPDATE t1 SET f1 = f1 + 100;;
connection node_1;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
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%';
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;;
@@ -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;

0 comments on commit 5482d62

Please sign in to comment.