Skip to content

Commit 0db5622

Browse files
committed
MDEV-36663: Testcase Fixup
There were two issues with the test: 1. A race between a race_condition.inc and status variable, where the status variable Rpl_semi_sync_master_status could be ON before the semi-sync connection finished establishing, resulting in Rpl_semi_sync_master_clients showing 0 (instead of 1). To fix this, we simply instead wait for Rpl_semi_sync_master_clients to be 1 before proceeding. 2. Another race between a race_condition.inc and status variable, where the wait_condition waited on a process_list command of 'BINLOG DUMP' to disappear to infer the binlog dump thread was killed, to where we then verified semi-sync state was correct using status variables. However, the 'BINLOG DUMP' command is overridden with a killed status before the semi-sync tear-down happens, and thereby we could see invalid values. The fix for this is to change the wait_condition to instead wait for the connection with the replication user is gone, because that stays through the binlog dump thread tear-down life-cycle
1 parent 6f8ef26 commit 0db5622

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mysql-test/suite/rpl/t/rpl_semi_sync_ssl_stop.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ SET @@GLOBAL.rpl_semi_sync_slave_enabled= 1;
4949

5050
--connection master
5151
--echo # Verify Semi-Sync is active
52-
--let $status_var= Rpl_semi_sync_master_status
53-
--let $status_var_value= ON
52+
--let $status_var= Rpl_semi_sync_master_clients
53+
--let $status_var_value= 1
5454
--source include/wait_for_status_var.inc
5555
SHOW STATUS LIKE 'Rpl_semi_sync_master_clients';
5656

@@ -67,7 +67,7 @@ STOP SLAVE;
6767
--echo # MDEV-36663: Verifying dump thread connection is killed..
6868
# Prior to MDEV-36663 fixes, this would time out and
6969
# Rpl_semi_sync_master_clients would remain 1.
70-
--let $wait_condition= SELECT COUNT(*)=0 FROM information_schema.PROCESSLIST WHERE COMMAND = 'Binlog Dump'
70+
--let $wait_condition= SELECT COUNT(*)=0 FROM information_schema.PROCESSLIST WHERE USER = 'replssl'
7171
--source include/wait_condition.inc
7272

7373
--let $n_master_clients= query_get_value(SHOW STATUS LIKE 'Rpl_semi_sync_master_clients', Value, 1)

0 commit comments

Comments
 (0)