Nirbhay Choubey <nirbhay@mariadb.com> writes:
Suppose we have this transaction:
BEGIN GTID 2-1-100 INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); COMMIT;
What happens in the following scenario?
CHANGE MASTER TO master_use_gtid=current_pos, ignore_domain_ids=(2); START SLAVE; # slave IO thread connects to master; # slave receives: BEGIN GTID 2-1-100; INSERT INTO t1 VALUES (1); # slave IO thread is disconnected from master STOP SLAVE; # slave mysqld process is stopped and restarted. CHANGE MASTER TO master_use_gtid=no, ignore_domain_ids=(); START SLAVE; # slave IO thread connects to master; # slave IO thread receives: INSERT INTO t1 VALUES (2); COMMIT;
Ah, now I see. CHANGE MASTER deletes the relay logs. So it's not a problem if the ignore_domain_ids changes in the middle of receiving an event group, we will discard that partial event group anyway. (I missed the fact that (almost) any CHANGE MASTER deletes the relay logs, but it's actually documented). Ok that's good, so there is no bug here.
Following your suggestion, I have now added 2 more cases (4 and 5) using DBUG_EXECUTE_IF(+d,"kill_slave_io_after_2_events") to kill I/O after reading first INSERT in a transaction. The outcome is expected.
Cool, thanks. Looks good now, I think. - Kristian.