Bug #115605 START REPLICA doesn't start the SQL_THREAD
Submitted: 16 Jul 2024 11:27 Modified: 17 Jul 2024 9:52
Reporter: Aaditya Dubey Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:8.0.38 OS:Any
Assigned to: CPU Architecture:Any

[16 Jul 2024 11:27] Aaditya Dubey
Description:
Replication doesn't restart when we issue START REPLICA, especially SQL_THREAD.

Interestingly, this behaviour doesn't exist in 5.7, so it's all good in 5.7

Following warnings getting generated in the error log:

2024-07-16T10:58:24.893961Z 20 [Warning] [MY-010897] [Repl] Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.

How to repeat:
Please start 8.0.38 with replication topology with replica_parallel_workers>1 set.

Connect to MySQL REPLICA Client and run the following set of commands:

pager grep -E '(2024|arning|Running)'
SELECT NOW()\G

STOP REPLICA IO_THREAD;
SELECT SLEEP(2);
STOP REPLICA SQL_THREAD;

SELECT SLEEP(2);
SELECT NOW()\G
START REPLICA SQL_THREAD UNTIL SQL_AFTER_MTS_GAPS;
SHOW REPLICA STATUS\G

SELECT SLEEP(2);
SELECT NOW()\G 
START REPLICA;
SHOW REPLICA STATUS\G

Suggested fix:
It should work as 5.7
[17 Jul 2024 9:52] MySQL Verification Team
Hello Aaditya,

Thank you for the report and test case.

regards,
Umesh