MDEV-7940: Sporadic failure in rpl.rpl_gtid_until
Fix a race in the test case. When we do start_slave.inc immediately followed by stop_slave.inc, it is possible to kill the IO thread while it is still running inside get_master_version_and_clock(), and this gives warnings in the error log that cause the test to fail.
This commit is contained in:
parent
b3c7c8cde8
commit
15a2b5aab1
@ -44,14 +44,14 @@ a
|
|||||||
1
|
1
|
||||||
2
|
2
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200";
|
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200,0-1-300";
|
||||||
include/wait_for_slave_to_start.inc
|
include/wait_for_slave_to_start.inc
|
||||||
Using_Gtid = 'Current_Pos'
|
Using_Gtid = 'Current_Pos'
|
||||||
Until_Condition = 'Gtid'
|
Until_Condition = 'Gtid'
|
||||||
|
INSERT INTO t1 VALUES (3);
|
||||||
|
DELETE FROM t1 WHERE a=3;
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
include/start_slave.inc
|
|
||||||
*** Test UNTIL condition in an earlier binlog than the start GTID. ***
|
*** Test UNTIL condition in an earlier binlog than the start GTID. ***
|
||||||
include/stop_slave.inc
|
|
||||||
SET gtid_domain_id = 1;
|
SET gtid_domain_id = 1;
|
||||||
INSERT INTO t1 VALUES (3);
|
INSERT INTO t1 VALUES (3);
|
||||||
SET gtid_domain_id = 2;
|
SET gtid_domain_id = 2;
|
||||||
|
@ -73,19 +73,29 @@ SELECT * FROM t1 ORDER BY a;
|
|||||||
|
|
||||||
# Test showing the UNTIL condition in SHOW SLAVE STATUS.
|
# Test showing the UNTIL condition in SHOW SLAVE STATUS.
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200";
|
START SLAVE UNTIL master_gtid_pos = "1-10-100,2-20-200,0-1-300";
|
||||||
--source include/wait_for_slave_to_start.inc
|
--source include/wait_for_slave_to_start.inc
|
||||||
--let $status_items= Using_Gtid,Until_Condition
|
--let $status_items= Using_Gtid,Until_Condition
|
||||||
--source include/show_slave_status.inc
|
--source include/show_slave_status.inc
|
||||||
|
|
||||||
# Clear the UNTIL condition.
|
# Clear the UNTIL condition.
|
||||||
|
# Note that we need to wait for a transaction to get through from the master.
|
||||||
|
# Otherwise the IO thread may still be in get_master_version_and_clock()
|
||||||
|
# (wait_for_slave_to_start.inc returns as soon as the IO thread is connected),
|
||||||
|
# and we can get test failures from warnings in the log about IO thread being
|
||||||
|
# killed in the middle of setting @@gtid_strict_mode or similar (MDEV-7940).
|
||||||
|
--connection server_1
|
||||||
|
INSERT INTO t1 VALUES (3);
|
||||||
|
DELETE FROM t1 WHERE a=3;
|
||||||
|
--save_master_pos
|
||||||
|
|
||||||
|
--connection server_2
|
||||||
|
--sync_with_master
|
||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
--source include/start_slave.inc
|
|
||||||
|
|
||||||
|
|
||||||
--echo *** Test UNTIL condition in an earlier binlog than the start GTID. ***
|
--echo *** Test UNTIL condition in an earlier binlog than the start GTID. ***
|
||||||
--connection server_2
|
--connection server_2
|
||||||
--source include/stop_slave.inc
|
|
||||||
|
|
||||||
--connection server_1
|
--connection server_1
|
||||||
SET gtid_domain_id = 1;
|
SET gtid_domain_id = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user