mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix test failure on test MW-86 and remove MW-360 test.
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).
This commit is contained in:
@@ -1635,12 +1635,6 @@ void THD::init(void)
|
||||
wsrep_affected_rows = 0;
|
||||
wsrep_replicate_GTID = false;
|
||||
wsrep_skip_wsrep_GTID = false;
|
||||
/*
|
||||
@@wsrep_causal_reads is now being handled via wsrep_sync_wait, update it
|
||||
appropriately.
|
||||
*/
|
||||
if (variables.wsrep_causal_reads)
|
||||
variables.wsrep_sync_wait|= WSREP_SYNC_WAIT_BEFORE_READ;
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
if (variables.sql_log_bin)
|
||||
|
||||
Reference in New Issue
Block a user