Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31655

Parallel replication deadlock victim preference code errorneously removed

    XMLWordPrintable

Details

    Description

      Somewhere during the work on VATS in InnoDB, the code that calls thd_deadlock_victim_preference() was errorneously removed; and later the function itself was also removed errorneously as dead code.

      commit 2fd3af44830e8df9d60f2e8a955f9ed17e744986
      Author: sensssz <hjmsens@gmail.com>
      Date:   Thu Dec 1 13:45:23 2016 -0500
       
          MDEV-11168: InnoDB: Failing assertion: !other_lock || wsrep_thd_is_BF(lock->trx->mysql_thd, FALSE) || wsrep_thd_is_BF(other_lock->trx->mysql_thd, FALSE)
      

      commit 1513630d302932a90c94fef6803877f37f0e0f22
      Author: Eugene Kosov <claprix@yandex.ru>
      Date:   Mon Apr 9 17:21:21 2018 +0300
       
          remove dead code
      

      This may lead to significantly more transaction retries in in-order parallel replication, since InnoDB may choose the wrong deadlock victim (If T1 and T2 need to replicate in-order and deadlock with each other, then choosing T1 as deadlock victim is pointless as T2 will be killed and deadlocked anyway by parallel replication).

      The lost code should be restored.
      It looks like the InnoDB deadlock code in later MariaDB versions was changed substantially, so the restored code probably needs to be rewritten for merging to those later versions.

      Attachments

        Issue Links

          Activity

            People

              knielsen Kristian Nielsen
              knielsen Kristian Nielsen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.