1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-5262, MDEV-5914, MDEV-5941, MDEV-6020: Deadlocks during parallel replication causing replication to fail.

Merge the patches into MariaDB 10.0 main.

With this patch, parallel replication will now automatically retry a
transaction that fails due to deadlock or other temporary error, same as
single-threaded replication.

We catch deadlocks with InnoDB transactions due to enforced commit order. If
T1 must commit before T2 in parallel replication and T1 ends up waiting for T2
inside InnoDB, we kill T2 and retry it later to resolve the deadlock
automatically.
This commit is contained in:
Kristian Nielsen
2014-07-11 12:06:47 +02:00
33 changed files with 1918 additions and 273 deletions

View File

@ -1358,7 +1358,8 @@ enum enum_thread_type
SYSTEM_THREAD_NDBCLUSTER_BINLOG= 8,
SYSTEM_THREAD_EVENT_SCHEDULER= 16,
SYSTEM_THREAD_EVENT_WORKER= 32,
SYSTEM_THREAD_BINLOG_BACKGROUND= 64
SYSTEM_THREAD_BINLOG_BACKGROUND= 64,
SYSTEM_THREAD_SLAVE_INIT= 128,
};
inline char const *
@ -1741,6 +1742,8 @@ struct wait_for_commit
{
if (waitee)
unregister_wait_for_prior_commit2();
else
wakeup_error= 0;
}
/*
Remove a waiter from the list in the waitee. Used to unregister a wait.