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

When master is on the list of ignore_server_ids, GTID position on slave is not updated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.2
    • 10.0.5
    • None
    • None

    Description

      When IGNORE_SERVER_IDS list contains ID of the master, events coming from the master are ignored, but the master coordinates are updated. So, if later the ID is removed from the list, replication continues from the moment when the list was updated (which seems natural, otherwise why to ignore the server at all).
      With MASTER_USE_GTID, the old-style coordinates are still updated, but GTID position isn't. So, when the ID is removed from the list, replication continues from the first previously ignored event.

      In the scenario below, we create a table on master, replicate it to the slave. Then we add the master's ID to the ignored list, execute two INSERTs, remove the ID from the list and execute two more INSERTs. The expectation is that only two last values will make it to the table on the slave, which is indeed so with MASTER_USE_GTID=0, but not with MASTER_USE_GTID=1.

      Test case:

      --let $rpl_topology= 1->2
      --source include/rpl_init.inc
       
      --connection server_1
      create table t1 (i int);
      --save_master_pos
       
      --connection server_2
      --sync_with_master
      --source include/stop_slave.inc
      change master to ignore_server_ids = (1), master_use_gtid = 1;
      --source include/start_slave.inc
       
      --connection server_1
      insert into t1 values (1);
      insert into t1 values (2);
      --save_master_pos
       
      --connection server_2
      --sync_with_master
      select @@gtid_pos;
      --source include/stop_slave.inc
      change master to ignore_server_ids = ();
      --source include/start_slave.inc
      select * from t1;
       
      --connection server_1
      insert into t1 values (3);
      insert into t1 values (4);
      --save_master_pos
       
      --connection server_2
      --sync_with_master
      select * from t1;
       
      --source include/rpl_end.inc

      cnf file:

      !include suite/rpl/rpl_1slave_base.cnf
      !include include/default_client.cnf
       
      [mysqld.1]
      log-slave-updates
      gtid-domain-id=1
       
      [mysqld.2]
      log-slave-updates
      gtid-domain-id=2

      bzr version-info

      revision-id: knielsen@knielsen-hq.org-20130503092729-gedp152b19k5wdnj
      revno: 3626
      branch-nick: 10.0-base

      Attachments

        Issue Links

          Activity

            People

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