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

Slave SQL thread can't be the victim when deadlock occur

    XMLWordPrintable

    Details

      Description

      When slave support some operations even read-only statement may hold some locks (read will hold locks when isolation level is serializable). So sql thread and worker threads may get deadlock with user threads and have chances to be the victim which would lead to a break between master and slave.

      Fix :
      We assume each thread have a priority, the priority will decide who is the victim rather than thread's weight and the system threads have high priority(slave threads for now).

      In the attach file, a testcase script can reproduce the problem easily and a diff file to show the code to fix it.

        Attachments

          Activity

            People

            Assignee:
            Elkin Andrei Elkin
            Reporter:
            zhang xiaojian zhang jian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: