[MDEV-4488] When master is on the list of ignore_server_ids, GTID position on slave is not updated Created: 2013-05-05  Updated: 2013-08-22  Resolved: 2013-08-22

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.2
Fix Version/s: 10.0.5

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26 Global transaction ID Closed

 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



 Comments   
Comment by Kristian Nielsen [ 2013-08-22 ]

Pushed to 10.0-base.

This was a bit tricky due to the complexity of the related replication code, but I hope I got it right.

Generated at Thu Feb 08 06:56:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.