Bug #106535 Enhance replication start / stop logging to provide more information
Submitted: 22 Feb 2022 7:48 Modified: 22 Feb 2022 8:44
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:8.0.28, 5.7 and earlier OS:Any
Assigned to: CPU Architecture:Any
Tags: windmill

[22 Feb 2022 7:48] Simon Mudd
Description:
Current logging in 8.0.28 shows only the binlog / relaylog file and position.
- With parallel replication this does not clarify exactly the state of the database or the exact state of the stopping parallel replication threads.

- Use of GTID is common and recommended, but not obligatory and the gtid_mode is not shown in the start or stop logging of either I/O or SQL threads.

Problems with the I/O thread:
- the I/O thread does not indicate if it is using auto-position.
- the I/O thread does not indicate if it is using TLS or the version/configuration being used. These days security requirement make it important to see/confirm this information. Logging does not show this.

Problems with the SQL thread:
- slave_exec_mode is not shown. Its value is usually STRICT but might not be.

How to repeat:

- Start or stop replication with different settings of gtid_mode including the use of auto-position
- start or stop replication with different settings of TLS
- start or stop replication with different settings of slave_exec_mode
- start or stop replication with different parallel replication settings
- notice how logging does not indicate WHO makes the replication changes. That can be quite important and is not shown.

Look for information on any of these settings in the logging and you'll see it is missing.

For forensics when replication issues occur this information would be very valuable, but it is not provided.

Suggested fix:
Improve the logging to more concisely indicate the state and settings of replication when it starts.

Consider improving logging to show who changes replication settings.
Consider improving logging to indicate who starts or stop replication when done explicitly and not due to an error talking to the upstream master.

Ensure that when replication stops the state is indicated clearly to show the latest information replicated into the server.
[22 Feb 2022 8:44] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

regards,
Umesh