mirror of
https://github.com/MariaDB/server.git
synced 2025-02-09 23:24:11 +01:00
![sjaakola](/assets/img/avatar_default.png)
This commit contains only a mtr test for reproducing the issue in MDEV-29512 The actual fix will be pushed in wsrep-lib repository The hanging in MDEV-29512 happens when binlog purging is attempted, and there is one local BF aborted transaction waiting for commit monitor. The test will launch two node cluster and enable binlogging with expire log days, to force binlog purging to happen. A local transaction is executed so that will become BF abort victim, and has advanced to replication stage waiting for commit monitor for final cleanup (to mark position in innodb) after that, applier is released to complete the BF abort and due to binlog configuration, starting the binlog purging. This is where the hanging would occur, if code is buggy Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
connection node_2;
|
|
connection node_1;
|
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 varchar(2000));
|
|
INSERT INTO t1 VALUES (1, 0, REPEAT('1234567890', 200));
|
|
INSERT INTO t1 VALUES (3, 3, REPEAT('1234567890', 200));
|
|
SET SESSION wsrep_sync_wait=0;
|
|
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
|
|
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
connection node_1a;
|
|
SET SESSION wsrep_sync_wait=0;
|
|
connection node_1;
|
|
begin;
|
|
select f1,f2 from t1;
|
|
f1 f2
|
|
1 0
|
|
3 3
|
|
connection node_2;
|
|
UPDATE t1 SET f2=2 WHERE f1=3;
|
|
connection node_1a;
|
|
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
|
connection node_1;
|
|
UPDATE t1 SET f2=1 WHERE f1=3;
|
|
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
|
COMMIT;
|
|
connection node_1a;
|
|
SET SESSION wsrep_on = 0;
|
|
SET SESSION wsrep_on = 1;
|
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
|
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
|
SET GLOBAL DEBUG_DBUG = "";
|
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
|
SET GLOBAL debug_dbug = NULL;
|
|
SET debug_sync='RESET';
|
|
connection node_1;
|
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
select f1,f2 from t1;
|
|
f1 f2
|
|
1 0
|
|
3 2
|
|
DROP TABLE t1;
|