mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 23:35:32 +02:00
Merged from mysql-wsrep-bugs following:
GCF-1058 MTR test galera.MW-86 fails on repeated runs
Wait for the sync point sync.wsrep_apply_cb to be reached before
executing the test and clearing the debug flag sync.wsrep_apply_cb.
The race scenario:
Intended behavior:
node2: set sync.wsrep_apply_cb in order to start waiting in the background INSERT
node1: INSERT start
node2 (background): INSERT start
node1: INSERT end
node2: send signal to background INSERT: "stop waiting and continue executing"
node2: clear sync.wsrep_apply_cb as no longer needed
node2 (background): consume the signal
node2 (background): INSERT end
node2: DROP TABLE
node2: check no pending signals are left - ok
What happens occasionally (unexpected):
node2: set sync.wsrep_apply_cb in order to start waiting in the background INSERT
node1: INSERT start
node2 (background): INSERT start
node1: INSERT end
// The background INSERT still has _not_ reached the place where it starts
// waiting for the signal:
// DBUG_EXECUTE_IF("sync.wsrep_apply_cb", "now wait_for...");
node2: send signal to background INSERT: "stop waiting and continue executing"
node2: clear sync.wsrep_apply_cb as no longer needed
// The background INSERT reaches DBUG_EXECUTE_IF("sync.wsrep_apply_cb", ...)
// but sync.wsrep_apply_cb has already been cleared and the "wait" code is not
// executed. The signal remains unconsumed.
node2 (background): INSERT end
node2: DROP TABLE
node2: check no pending signals are left - failure, signal.wsrep_apply_cb is
pending (not consumed)
Remove MW-360 test case as it is not intended for MariaDB (uses
MySQL GTID).
50 lines
1.5 KiB
Text
50 lines
1.5 KiB
Text
SELECT @@debug_sync;
|
|
@@debug_sync
|
|
ON - current signal: ''
|
|
SET SESSION wsrep_sync_wait = 8;
|
|
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
|
|
Warnings:
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
|
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
|
|
INSERT INTO t_wait8 VALUES (1);
|
|
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
|
|
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
|
SHOW BINARY LOGS;
|
|
SHOW BINLOG EVENTS;
|
|
SHOW COLUMNS FROM t1;
|
|
SHOW CREATE DATABASE db1;
|
|
SHOW CREATE EVENT e1;
|
|
SHOW CREATE FUNCTION f1;
|
|
SHOW CREATE PROCEDURE p1;
|
|
SHOW CREATE TABLE t1;
|
|
SHOW CREATE TRIGGER tr1;
|
|
SHOW CREATE VIEW v1;
|
|
SHOW DATABASES;
|
|
SHOW ENGINE InnoDB STATUS;
|
|
SHOW FUNCTION CODE f1;
|
|
SHOW FUNCTION STATUS;
|
|
SHOW GRANTS FOR 'root'@'localhost';
|
|
SHOW INDEX FROM t1;
|
|
SHOW OPEN TABLES;
|
|
SHOW PROCEDURE CODE p1;
|
|
SHOW PROCEDURE STATUS;
|
|
SHOW PRIVILEGES;
|
|
SHOW STATUS LIKE 'wsrep_cluster_size';
|
|
SHOW TABLE STATUS;
|
|
SHOW TABLES;
|
|
SHOW TRIGGERS;
|
|
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
|
|
SHOW WARNINGS;
|
|
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
|
|
Warnings:
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
|
SET SESSION wsrep_sync_wait = default;
|
|
DROP TABLE t_wait8;
|
|
SET GLOBAL debug = NULL;
|
|
Warnings:
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
|
SET debug_sync='RESET';
|
|
SELECT @@debug_sync;
|
|
@@debug_sync
|
|
ON - current signal: ''
|