Bug #110094 When slave replays the STOP EVENT, the stop slave will cause a dead cycle

Submitted: 16 Feb 2023 7:34 Modified: 22 Feb 2023 13:55
Reporter: GONGTUI FU Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:8.0.25 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[16 Feb 2023 7:34] GONGTUI FU
Description:
When slave gets a GTID EVENT from master,then stop the server.The STOP EVENT will be recorded in the relaylog file.
If we change the server-id and restart the server,executing START SLAVE SQL_THREAD and STOP SLAVE SQL_THREAD will casuse a endless loop.

How to repeat:
slave server uses DEBUG version.
1. slave server executes: SET GLOBAL DEBUG='d,stop_io_after_reading_gtid_log_event';(only receive GTID EVENT)
2. maser server executes any dml statement.
3. stop slave server. This will generate a STOP EVENT after GTID EVENT in relaylog file.
4. stop master server. It prevents the slave server from automatically connecting to the master server after starting.
5. modify server-id that is in my.cnf, for execution of STOP EVENT.
6. start slave server and executing START SLAVE SQL_THREAD.
7. executing STOP SLAVE SQL_THREAD.

A dead cycle occurs!
[21 Feb 2023 16:57] MySQL Verification Team
Hi,

Did you try this on later 8.0.31? I'm having issue reproducing this on 8.0.31.

Thanks
[22 Feb 2023 8:36] GONGTUI FU
I didn't.
[22 Feb 2023 13:55] MySQL Verification Team
Hi,

Having issue reproducing this with 8.0.32, please provide reproducible test case that works with 8.0.32

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.