Commit 4b4e77db authored by Julius Goryavsky's avatar Julius Goryavsky

Merge branch '10.4-MDEV-22729' of https://github.com/codership/mariadb-server...

Merge branch '10.4-MDEV-22729' of https://github.com/codership/mariadb-server into 10.4-MDEV-22729-2
parents 4c3cbe23 ccec6b88
...@@ -4,9 +4,7 @@ connection node_2; ...@@ -4,9 +4,7 @@ connection node_2;
connection node_1; connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3; connection node_3;
SET GLOBAL wsrep_on=OFF;
RESET MASTER; RESET MASTER;
SET GLOBAL wsrep_on=ON;
connection node_2a; connection node_2a;
START SLAVE; START SLAVE;
connection node_3; connection node_3;
...@@ -72,20 +70,17 @@ SET AUTOCOMMIT=ON; ...@@ -72,20 +70,17 @@ SET AUTOCOMMIT=ON;
START TRANSACTION; START TRANSACTION;
UPDATE t1 SET f2 = 'd' WHERE f1 = 3; UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
connection node_2a; connection node_2a;
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
connection node_3; connection node_1;
UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3; UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
connection node_2a;
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_3; connection node_3;
COMMIT; COMMIT;
connection node_2a; connection node_2a;
SET GLOBAL debug_dbug = ""; SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
connection node_2a; connection node_2a;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
SET DEBUG_SYNC = "RESET";
connection node_2a;
set session wsrep_sync_wait=15; set session wsrep_sync_wait=15;
SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e'; SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
COUNT(*) = 1 COUNT(*) = 1
...@@ -93,9 +88,8 @@ COUNT(*) = 1 ...@@ -93,9 +88,8 @@ COUNT(*) = 1
set session wsrep_sync_wait=0; set session wsrep_sync_wait=0;
STOP SLAVE; STOP SLAVE;
RESET SLAVE; RESET SLAVE;
SET DEBUG_SYNC = "RESET";
DROP TABLE t1; DROP TABLE t1;
connection node_3; connection node_3;
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL wsrep_on=OFF;
RESET MASTER; RESET MASTER;
SET GLOBAL wsrep_on=ON;
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
# #
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3 --connection node_3
SET GLOBAL wsrep_on=OFF;
RESET MASTER; RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connection node_2a --connection node_2a
# #
...@@ -156,35 +154,31 @@ UPDATE t1 SET f2 = 'd' WHERE f1 = 3; ...@@ -156,35 +154,31 @@ UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
--let $wait_condition = SELECT COUNT(*) = 4 FROM test.t1; --let $wait_condition = SELECT COUNT(*) = 4 FROM test.t1;
--source include/wait_condition.inc --source include/wait_condition.inc
# Block the commit
--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
# block applier # block applier
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
# Inject a conflicting update from node 3 # Inject a conflicting update from node 1
--connection node_3 --connection node_1
UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3; UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
--connection node_2a
# wait until applier has reached the sync point
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
--let $expected_cert_failures = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
# send the update from master # send the update from master
--connection node_3 --connection node_3
--error 0 --error 0
COMMIT; COMMIT;
--connection node_2a --connection node_2a
--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
--source include/wait_condition.inc
# release the applier # release the applier from node 1
SET GLOBAL debug_dbug = ""; SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
# Unblock the async slave commit
--connection node_2a
--source include/galera_clear_sync_point.inc
--source include/galera_signal_sync_point.inc
SET DEBUG_SYNC = "RESET";
--connection node_2a --connection node_2a
set session wsrep_sync_wait=15; set session wsrep_sync_wait=15;
...@@ -193,11 +187,10 @@ set session wsrep_sync_wait=0; ...@@ -193,11 +187,10 @@ set session wsrep_sync_wait=0;
STOP SLAVE; STOP SLAVE;
RESET SLAVE; RESET SLAVE;
SET DEBUG_SYNC = "RESET";
DROP TABLE t1; DROP TABLE t1;
--connection node_3 --connection node_3
DROP TABLE t1; DROP TABLE t1;
SET GLOBAL wsrep_on=OFF;
RESET MASTER; RESET MASTER;
SET GLOBAL wsrep_on=ON;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment