mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-27849: rpl.rpl_start_alter_XXX fail sporadically in buildbot
The problem is that these tests run optimistic parallel replication with non-transactional mysql.gtid_slave_pos table. Very occasionally InnoDB stats update may race with one another and cause a parallel replication deadlock kill after the mysql.gtid_slave_pos table has been updated. Since mysql.gtid_slave_pos is non-transactional, the update cannot be rolled back, and transaction retry will fail with a duplicate key error in mysql.gtid_slave_pos. Fixed by altering the storage engine to InnoDB for the table. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
connection slave;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
connection slave;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
connection slave;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
connection slave;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
connection slave;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
connection slave;
|
||||
|
@@ -10,6 +10,10 @@ Warnings:
|
||||
Note 1255 Slave already has been stopped
|
||||
set global binlog_alter_two_phase=true;
|
||||
connection server_3;
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("The table mysql.gtid_slave_pos was removed. This change will not take full effect until all SQL threads have been restarted");
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
SET GLOBAL slave_parallel_threads=8;
|
||||
set global slave_parallel_mode=optimistic;
|
||||
set global gtid_strict_mode=1;
|
||||
|
@@ -10,6 +10,10 @@ Warnings:
|
||||
Note 1255 Slave already has been stopped
|
||||
set global binlog_alter_two_phase=true;
|
||||
connection server_3;
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("The table mysql.gtid_slave_pos was removed. This change will not take full effect until all SQL threads have been restarted");
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
SET GLOBAL slave_parallel_threads=20;
|
||||
set global slave_parallel_mode=optimistic;
|
||||
set global gtid_strict_mode=1;
|
||||
|
@@ -4,6 +4,8 @@ connection master;
|
||||
set global binlog_alter_two_phase=true;
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global gtid_strict_mode=1;
|
||||
# Legacy Master Slave
|
||||
connect master_node,127.0.0.1,root,,$db_name, $M_port;
|
||||
|
@@ -49,6 +49,10 @@ connection server_2;
|
||||
SET @save_binlog_alter_two_phase= @@GLOBAL.binlog_alter_two_phase;
|
||||
SET GLOBAL binlog_alter_two_phase = ON;
|
||||
connection server_3;
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("The table mysql.gtid_slave_pos was removed. This change will not take full effect until all SQL threads have been restarted");
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
SET @save_gtid_strict_mode= @@GLOBAL.gtid_strict_mode;
|
||||
SET @slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
|
||||
SET @slave_parallel_mode= @@GLOBAL.slave_parallel_mode;
|
||||
|
@@ -6,6 +6,7 @@
|
||||
--source include/master-slave.inc
|
||||
|
||||
--connection master
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
|
@@ -8,9 +8,11 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/master-slave.inc
|
||||
--connection master
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
|
||||
--connection slave
|
||||
--let $gtid_strict_mode= `select @@gtid_strict_mode`
|
||||
--let $slave_parallel_threads= `select @@slave_parallel_threads`
|
||||
|
@@ -9,9 +9,11 @@
|
||||
--source include/master-slave.inc
|
||||
--source include/have_debug.inc
|
||||
--connection master
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
|
||||
--connection slave
|
||||
--let $gtid_strict_mode= `select @@gtid_strict_mode`
|
||||
--let $slave_parallel_threads= `select @@slave_parallel_threads`
|
||||
|
@@ -9,6 +9,7 @@
|
||||
--source include/master-slave.inc
|
||||
--source include/have_debug.inc
|
||||
--connection master
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
|
@@ -9,6 +9,7 @@
|
||||
--source include/master-slave.inc
|
||||
--source include/have_debug.inc
|
||||
--connection master
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
|
@@ -10,6 +10,7 @@
|
||||
--source include/master-slave.inc
|
||||
--source include/have_debug.inc
|
||||
--connection master
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
|
||||
set global binlog_alter_two_phase = ON;
|
||||
set binlog_alter_two_phase = ON;
|
||||
|
@@ -21,6 +21,10 @@ stop slave;
|
||||
set global binlog_alter_two_phase=true;
|
||||
|
||||
--connection server_3
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("The table mysql.gtid_slave_pos was removed. This change will not take full effect until all SQL threads have been restarted");
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $gtid_strict_mode= `select @@gtid_strict_mode`
|
||||
--let $slave_parallel_threads= `select @@slave_parallel_threads`
|
||||
--let $slave_parallel_mode= `select @@slave_parallel_mode`
|
||||
|
@@ -21,6 +21,10 @@ stop slave;
|
||||
set global binlog_alter_two_phase=true;
|
||||
|
||||
--connection server_3
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("The table mysql.gtid_slave_pos was removed. This change will not take full effect until all SQL threads have been restarted");
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
--let $gtid_strict_mode= `select @@gtid_strict_mode`
|
||||
--let $slave_parallel_threads= `select @@slave_parallel_threads`
|
||||
--let $slave_parallel_mode= `select @@slave_parallel_mode`
|
||||
|
@@ -10,6 +10,8 @@
|
||||
set global binlog_alter_two_phase=true;
|
||||
--connection slave
|
||||
--source include/stop_slave.inc
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
set global gtid_strict_mode=1;
|
||||
|
||||
--echo # Legacy Master Slave
|
||||
|
@@ -57,6 +57,10 @@ SET @save_binlog_alter_two_phase= @@GLOBAL.binlog_alter_two_phase;
|
||||
SET GLOBAL binlog_alter_two_phase = ON;
|
||||
|
||||
--connection server_3
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
CALL mtr.add_suppression("The table mysql.gtid_slave_pos was removed. This change will not take full effect until all SQL threads have been restarted");
|
||||
SET STATEMENT sql_log_bin=0 FOR
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
SET @save_gtid_strict_mode= @@GLOBAL.gtid_strict_mode;
|
||||
SET @slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
|
||||
SET @slave_parallel_mode= @@GLOBAL.slave_parallel_mode;
|
||||
|
Reference in New Issue
Block a user