MDEV-10684: rpl.rpl_domain_id_filter_restart fails in buildbot

The test failure in rpl.rpl_domain_id_filter_restart is caused by
MDEV-33887. That is, the test uses master_pos_wait() (called
indirectly by sync_slave_with_master) to try and wait for the
replica to catch up to the master. However, the waited on
transaction is ignored by the configured
  CHANGE MASTER TO IGNORE_DOMAIN_IDS=()
As MDEV-33887 reports, due to the IO thread updating the binlog
coordinates and the SQL thread updating the GTID state, if the
replica is stopped in-between these updates, the replica state will
be inconsistent. That is, the test expects that the GTID state will
be updated, so upon restart, the replica will be up-to-date.
However, if the replica is stopped before the SQL thread updates its
GTID state, then upon restart, the replica will fetch the previously
ignored event, which is no longer ignored upon restart, and execute
it. This leads to the sporadic extra row in t2.

This patch changes master_pos_wait() to use master_gtid_wait() to
ensure the replica state is consistent with the master state.
This commit is contained in:
Brandon Nesterenko 2024-04-11 09:48:07 -06:00
parent 04be12a8f5
commit a6aecbb036
2 changed files with 4 additions and 2 deletions

View file

@ -21,8 +21,9 @@ INSERT INTO t2 VALUES(1);
SELECT * FROM t2;
i
1
include/save_master_gtid.inc
connection slave;
connection slave;
include/sync_with_master_gtid.inc
SELECT * FROM t1;
i
1

View file

@ -35,9 +35,10 @@ SET @@session.gtid_domain_id= 1;
INSERT INTO t2 VALUES(1);
SELECT * FROM t2;
sync_slave_with_master;
source include/save_master_gtid.inc;
connection slave;
source include/sync_with_master_gtid.inc;
SELECT * FROM t1;
SELECT * FROM t2;