mirror of
https://github.com/MariaDB/server.git
synced 2025-11-28 17:36:30 +03:00
MDEV-30414 sporadic failures with galera var retry autocommit
changed tast case 2 to be deterministic Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
@@ -20,17 +20,25 @@ DROP TABLE t1;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
SET SESSION wsrep_retry_autocommit = 1;
|
SET SESSION wsrep_retry_autocommit = 1;
|
||||||
|
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
|
||||||
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
|
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
|
||||||
INSERT INTO t1 (f1) VALUES (3);
|
INSERT INTO t1 (f1) VALUES (3);
|
||||||
connection node_1a;
|
connection node_1a;
|
||||||
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
||||||
connection node_2;
|
connection node_2;
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
connection node_1;
|
connection node_1a;
|
||||||
|
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
0
|
0
|
||||||
|
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
|
||||||
|
connection node_1;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
1
|
||||||
SET DEBUG_SYNC = 'RESET';
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
SET GLOBAL debug_dbug = NULL;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
@@ -64,6 +72,8 @@ SET SESSION wsrep_retry_autocommit = 64;
|
|||||||
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
|
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
|
||||||
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
|
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
|
||||||
INSERT INTO t1 VALUES (5);
|
INSERT INTO t1 VALUES (5);
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
|
|||||||
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
|
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
|
||||||
|
--source include/wait_condition.inc
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
@@ -44,6 +46,7 @@ DROP TABLE t1;
|
|||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
|
||||||
SET SESSION wsrep_retry_autocommit = 1;
|
SET SESSION wsrep_retry_autocommit = 1;
|
||||||
|
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
|
||||||
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
|
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
|
||||||
--send INSERT INTO t1 (f1) VALUES (3)
|
--send INSERT INTO t1 (f1) VALUES (3)
|
||||||
|
|
||||||
@@ -51,14 +54,21 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
|
|||||||
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
|
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
|
||||||
|
--source include/wait_condition.inc
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--error 0,ER_LOCK_DEADLOCK
|
|
||||||
--reap
|
--reap
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
|
|
||||||
SET DEBUG_SYNC = 'RESET';
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
SET GLOBAL debug_dbug = NULL;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
@@ -79,6 +89,8 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
|
|||||||
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
|
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
|
||||||
|
--source include/wait_condition.inc
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
|
|
||||||
--connection node_1a
|
--connection node_1a
|
||||||
@@ -114,6 +126,11 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
|
|||||||
|
|
||||||
--send INSERT INTO t1 VALUES (5)
|
--send INSERT INTO t1 VALUES (5)
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
--let $count = 64
|
--let $count = 64
|
||||||
|
|||||||
Reference in New Issue
Block a user