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.

      Attachments

        Issue Links

          Activity

            knielsen Kristian Nielsen created issue -
            knielsen Kristian Nielsen made changes -
            Field Original Value New Value
            knielsen Kristian Nielsen made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            knielsen Kristian Nielsen made changes -
            Fix Version/s 10.0.18 [ 18702 ]
            Fix Version/s 10.1.4 [ 18400 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 60383 ] MariaDB v3 [ 65419 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 65419 ] MariaDB v4 [ 149016 ]

            People

              knielsen Kristian Nielsen
              knielsen Kristian Nielsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 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.