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

Optimistic Parallel Replication fails when gtid_slave_pos table is non transactional and binlog events are transactional

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2, 10.3, 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5
    • 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
    • Replication
    • None
    • Arch Linux

    Description

      --source include/have_binlog_format_row.inc
      --source include/have_innodb.inc
      --source include/master-slave.inc
       
      --sync_slave_with_master
      --source include/stop_slave.inc
       
      SET GLOBAL slave_parallel_threads=7;
      set global slave_parallel_mode=optimistic;
      set global slave_transaction_retries=1000;
      alter table mysql.gtid_slave_pos engine=myisam;
       
      # Create some conflicting events on master
      connection master;
      CREATE TABLE t1(a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) engine=innodb;
      INSERT INTO t1 VALUES (1),(2),(3),(4);
      --disable_query_log
      --let $count=5
      while ($count)
      {
      update t1 set a=a+5 where a=1;
      update t1 set a=a+5 where a=2;
      update t1 set a=a+5 where a=3;
      update t1 set a=a+5 where a=4;
      update t1 set a=a-5 where a=5;
      update t1 set a=a-5 where a=6;
      --dec $count
      }
      --enable_query_log
      select * from t1;
      drop table t1;
       
      --connection slave
      start slave;
      --connection master
      --sync_slave_with_master
      stop slave;
      SET GLOBAL slave_parallel_threads=0;
      set global slave_parallel_mode=conservative;
      set global slave_transaction_retries=10;
      start slave;
      --source include/rpl_end.inc
      

      Fails with following error:

      Last_Errno      1942
      Last_Error      Error during XID COMMIT: failed to update GTID state in mysql.gtid_slave_pos: 1062: Duplicate entry '0-11' for key 'PRIMARY'
      

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              sachin.setiya.007 Sachin Setiya (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.