[MDEV-9033] Incorrect statements binlogged on slave with do_domain_ids=(...) Created: 2015-10-28  Updated: 2015-11-23  Resolved: 2015-11-18

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.1
Fix Version/s: 10.1.9

Type: Bug Priority: Critical
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: gtid, multisource

Attachments: File rpl_gtid_rsevero.cnf     File rpl_gtid_rsevero.test     File rpl_gtid_rsevero2.cnf     File rpl_gtid_rsevero2.test    
Issue Links:
Duplicate
is duplicated by MDEV-9113 Endless loop in multi-source replicat... Closed
Relates
relates to MDEV-9107 GTID Slave Pos of untrack domain ids ... Closed
relates to MDEV-9108 "GTID not in master's binlog" error w... Open
Sprint: 10.1.9-3

 Description   

Problem originally reported by user rsevero on IRC FreeNode #maria.

Attached test case rpl.rpl_gtid_rsevero produces output with spurious extra CREATE TABLE statements in slave binlogs, probably depends on exact timing. For example:

master-bin.000001	314	Gtid	1	352	GTID 1-1-1
master-bin.000001	352	Query	1	479	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB
master-bin.000001	479	Gtid	1	517	BEGIN GTID 1-1-2
master-bin.000001	517	Query	1	611	use `test`; INSERT INTO t1 VALUES (1, "m1")
master-bin.000001	611	Xid	1	638	COMMIT /* xid=224 */
master-bin.000001	638	Gtid	1	676	BEGIN GTID 1-1-3
master-bin.000001	676	Query	1	792	use `test`; INSERT INTO t1 VALUES (2, "m2"), (3, "m3"), (4, "m4")
master-bin.000001	792	Xid	1	819	COMMIT /* xid=226 */
master-bin.000001	819	Gtid	1	857	GTID 3-1-1
master-bin.000001	857	Query	1	984	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB
master-bin.000001	984	Gtid	1	1022	GTID 2-1-1
master-bin.000001	1022	Query	1	1149	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB
master-bin.000001	1149	Gtid	1	1187	GTID 2-1-2
master-bin.000001	1187	Query	1	1314	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB

Note the wrong domain values in the GTIDs 3-1-1, 2-1-1, and 2-1-2; in the
test case, no transaction is ever created with a domain id other than 1.

In contrast, the same test using corresponding ignore_server_ids in place of
do_domain_ids (rpl_gtid_rsevero2) does not exhibit this problem. So looks
like a problem with the implementation of do_domain_ids, perhaps?



 Comments   
Comment by Rodrigo Severo [ 2015-10-28 ]

I have just tried the same exact setup as the one defined here http://pastebin.com/pcqwyWDa but now using ignore_domain_ids instead of do_domain_ids.

I see no diference on the problem when using do_domain_ids or ignore_domain_ids. AFAICT the problem isn't do_domain_ids only, it happens when using ignore_domain_ids also.

Comment by Rodrigo Severo [ 2015-11-03 ]

Just manage to test ignore_server_ids. It seems to work just fine.
{ignore|do)_domain_ids are bugged
ignore_server_ids is fine

Comment by Nirbhay Choubey (Inactive) [ 2015-11-18 ]

https://github.com/MariaDB/server/commit/f47124c9ef58d0f0e02d6c0ce616a7397420f99b

Generated at Thu Feb 08 07:31:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.