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

Incorrect relay log position in parallel replication after retry of transaction

    XMLWordPrintable

    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.

        Attachments

          Activity

            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: