Bug #96134 Please provide control functions for the IO Thread.
Submitted: 9 Jul 2019 5:43 Modified: 9 Jul 2019 13:36
Reporter: Jean-François Gagné Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.6, 5.7, 8.0 OS:Any
Assigned to: CPU Architecture:Any

[9 Jul 2019 5:43] Jean-François Gagné
Description:
Hi,

the functions MASTER_POS_WAIT, WAIT_FOR_EXECUTED_GTID_SET and WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS allow waiting for the SQL Thread to reach a certain position, but there are no corresponding functions for the IO Thread.  In the same logic, START SLAVE UNTIL allows starting replication until the SQL Thread reaches a specific position, but there is no corresponding command for the IO Thread.  It would be good to have such functions and command.  A use case for those is presented in [1].

[1]: https://jfg-mysql.blogspot.com/2019/07/master-replication-crash-safety-part-4-benchmarks-u...

Many thanks for looking into that,

JFG

How to repeat:
Not a bug, but a feature request, so does not apply.

Suggested fix:
Add functions and commands for:

1) waiting for the IO Thread to reach a binary log position (the name could be MASTER_IO_POS_WAIT)

2) waiting for the IO Thread to have downloaded a list of GTIDs (the name could be WAIT_FOR_RETRIEVED_GTID_SET in reference to Retrieved_Gtid_Set from SHOW SLAVE STATUS)

3) corresponding function of #2 for a specific channel: waiting for a specific channel IO Thread to have downloaded a list of GTIDs (the name could be WAIT_UNTIL_IO_THREAD_AFTER_GTIDS)

4) implementing START SLAVE UNTIL IO_THREAD [...].

At the same time, maybe standardise the naming of those functions and commands and add warnings to the old commands that should be deprecated.
[9 Jul 2019 13:36] MySQL Verification Team
Hello Jean-François,

Thank you for the feature request!

regards,
Umesh