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

record_gtid() for non-transactional event group calls wakeup_subsequent_commits() too early, causing slave hang

    Details

      Description

      This was found together with MDEV-7888, but it is a logically different bug,
      so filing separately.

      The parallel replication worker threads can hang in some cases with
      non-transactional event groups. The symptom is that worker threads are stuck
      in "waiting for prior transaction to start commit".

      The problem is when record_gtid() runs at the end of the non-transactional
      update. Then it needs to create its own transaction to update the
      mysql.gtid_slave_pos table. This causes ha_commit_trans() to call
      wakeup_subsequent_commits(). But this is wrong, it is too early.

      The hang then occurs because a following transaction things the prior
      non-transactional event group is already done - so it deallocates the
      corresponding group_commit_orderer object. Then a following worker thread does
      not get its wakeup, and the slave gets stuck.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Show
              knielsen Kristian Nielsen added a comment - http://lists.askmonty.org/pipermail/commits/2015-April/007723.html
              Show
              knielsen Kristian Nielsen added a comment - 10.1-specific part: http://lists.askmonty.org/pipermail/commits/2015-April/007724.html

                People

                • Assignee:
                  knielsen Kristian Nielsen
                  Reporter:
                  knielsen Kristian Nielsen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: