mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-31655: Parallel replication deadlock victim preference code errorneously removed
Restore code to make InnoDB choose the second transaction as a deadlock victim if two transactions deadlock that need to commit in-order for parallel replication. This code was erroneously removed when VATS was implemented in InnoDB. Also add a test case for InnoDB choosing the right deadlock victim. Also fixes this bug, with testcase that reliably reproduces: MDEV-28776: rpl.rpl_mark_optimize_tbl_ddl fails with timeout on sync_with_master Reviewed-by: Marko Mäkelä <marko.makela@mariadb.com> Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@ -80,6 +80,7 @@
|
||||
#include "debug_sync.h" // DEBUG_SYNC
|
||||
#include "debug.h" // debug_crash_here
|
||||
#include <my_bit.h>
|
||||
#include "rpl_rli.h"
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
#include "wsrep_trans_observer.h" /* wsrep_start_transction() */
|
||||
@ -1828,6 +1829,12 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, select_result *sink)
|
||||
save_read_set= table->read_set;
|
||||
save_write_set= table->write_set;
|
||||
|
||||
DBUG_EXECUTE_IF("rpl_write_record_small_sleep_gtid_100_200",
|
||||
{
|
||||
if (thd->rgi_slave && (thd->rgi_slave->current_gtid.seq_no == 100 ||
|
||||
thd->rgi_slave->current_gtid.seq_no == 200))
|
||||
my_sleep(20000);
|
||||
});
|
||||
if (info->handle_duplicates == DUP_REPLACE ||
|
||||
info->handle_duplicates == DUP_UPDATE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user