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

Replication broken since migrating to MariaDB 10.1

    XMLWordPrintable

    Details

      Description

      Since migrating to 10.1.18. We are unable to get replication working. The root cause is either that mysql dump is not exporting all the rows or the row based replication is broken.

      We create a mysqldump with --master-data and --single-transaction copy it to the slave, sets the correct master position and restarts.
      We also tried to use innobackupex to create a snapshot copy to the slave and let it start.
      What we are seeing is that as soon as the replication starts it fails with errors like this

      : Could not execute Update_rows_v1 event on table tock_prod.payment; Can't find record in 'payment', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mariadb-bin.000615, end_log_pos 4326763
      

      I tried to do a mysqlbinlog inspection of mariadb-bin.000615 and found the offending row. it refers to a payment row that is being updated. However the primary key below 1027178 is not seen in the mysql dump file but it is available on the master. Note that the master is one of 3 running in a galera based replication.

      '/*!*/;
      ### UPDATE `tock_prod`.`payment`
      ### WHERE
      ###   @1=1027178
      ###   @2=123
      ###   @3=1546072
      ###   @4=''
      ###   @5=0
      ###   @6='2700'
      ###   @7='Discover'
      ###   @8=11800
      ###   @9=0
      ###   @10=2016-10-05 20:49:39
      ###   @11=2016-10-05 20:49:41
      ###   @12=1
      ###   @13=NULL
      ### SET
      ###   @1=1027178
      ###   @2=123
      ###   @3=1546072
      ###   @4=''
      ###   @5=0
      ###   @6='2700'
      ###   @7='Discover'
      ###   @8=11800
      ###   @9=0
      ###   @10=2016-10-05 20:49:39
      ###   @11=2016-10-05 20:49:41
      ###   @12=1
      ###   @13=372
      # at 4326763
      
      

      We are using ROW based replication. This used to work correctly when we were on 10.0.20-25 versions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              robinanil Robin Anil
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.