1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-34042: Deadlock kill of XA PREPARE can break replication / rpl.rpl_parallel_multi_domain_xa sporadic failure

Refinement of the original patch.

Move the code to reset the kill up into the parent class
Xid_apply_log_event, to also fix the similar issue for XA COMMIT.

Increase the number of slave retries in the test case
rpl.rpl_parallel_multi_domain_xa to fix some sporadic failures. The test
generates massive amounts of conflicting transactions in multiple
independent domains, which can cause multiple rollback+retry for a
transaction as it conflicts with transactions in other domains one-by-one.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2024-05-04 11:02:41 +02:00
parent 2a2019e199
commit 4b4db4a8e5
3 changed files with 33 additions and 13 deletions

View File

@@ -21,6 +21,12 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
--connection slave
--sync_with_master
--source include/stop_slave.inc
# This test runs huge number of transactions independently in parallel that
# all conflict on a single row. This requires a large number of retries, as a
# transaction can repeatedly conflict/deadlock with a large number of other
# transactions (in a different domain) one by one.
SET @old_transaction_retries = @@GLOBAL.slave_transaction_retries;
SET @@global.slave_transaction_retries = 1000;
SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
SET @old_slave_domain_parallel_threads = @@GLOBAL.slave_domain_parallel_threads;
SET @@global.slave_parallel_threads = 5;
@@ -160,6 +166,7 @@ SET @@global.slave_parallel_mode = 'optimistic';
SET @@global.slave_parallel_mode = @old_parallel_mode;
SET @@global.slave_parallel_threads = @old_parallel_threads;
SET @@global.slave_domain_parallel_threads = @old_slave_domain_parallel_threads;
SET @@global.slave_transaction_retries = @old_transaction_retries;
--source include/start_slave.inc
--connection master