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

Incorrect relay log position in parallel replication after retry of transaction

    Details

      Description

      During parallel replication, if a deadlock or other temporary error occurs,
      the code needs to re-read and re-execute the events for that transaction.

      There is a bug that causes the relay log positions of the SQL thread to be set
      incorrect by this retry code. The result is that if the SQL thread is stopped
      immediately after the successful retry of a transaction, the relay log
      position will be wrong (it is too large by the size of the last event
      executed). Thus, when the SQL thread is restarted, some kind of corruption
      occurs (usually an error to read the event).

      Note that the problem only occurs if the error that causes the retry happens
      in the last event of the event group (COMMIT/XID). Otherwise that event is
      executed by the normal apply code, which does not have the position bug.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            knielsen Kristian Nielsen added a comment -
            Show
            knielsen Kristian Nielsen added a comment - Patch with test case and fix: http://lists.askmonty.org/pipermail/commits/2014-November/006922.html
            Hide
            arjen Arjen Lentz added a comment -

            yay great!

            Show
            arjen Arjen Lentz added a comment - yay great!
            Show
            knielsen Kristian Nielsen added a comment - Pushed to 10.0.15: http://lists.askmonty.org/pipermail/commits/2014-November/006978.html

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: