1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Fixes a deadlock between applier and its victim transaction.
The deadlock would manifest when a BF victim was waiting for some lock
and was signaled to rollback, and the same time its wait
timeout expired. In such cases the victim would return from
lock_wait_suspend_thread() with error DB_LOCK_WAIT_TIMEOUT, as opposed to
DB_DEADLOCK. As a result only the last statement of the victim would rollback,
and eventually it would deadlock with the applier.
This commit is contained in:
Daniele Sciascia
2015-10-15 15:13:29 +02:00
committed by Nirbhay Choubey
parent 267d429b5a
commit 1d21676853

View File

@@ -394,7 +394,8 @@ lock_wait_suspend_thread(
if (lock_wait_timeout < 100000000
&& wait_time > (double) lock_wait_timeout) {
#ifdef WITH_WSREP
if (!wsrep_is_BF_lock_timeout(trx)) {
if (!wsrep_is_BF_lock_timeout(trx)
&& trx->error_state != DB_DEADLOCK) {
#endif /* WITH_WSREP */
trx->error_state = DB_LOCK_WAIT_TIMEOUT;