Bug #102386 Make the list of semisync enabled replicas easy to query
Submitted: 27 Jan 2021 7:24 Modified: 27 Jan 2021 7:38
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:8.0.23 OS:Any
Assigned to: CPU Architecture:Any
Tags: semisync, usability

[27 Jan 2021 7:24] Daniël van Eeden
Description:
With these:

SELECT * FROM information_schema.processlist WHERE COMMAND LIKE 'Binlog Dump%';
SHOW SLAVE HOSTS;

you can see:
* which replicas are connected
* which replicas use GTID (Binlog Dump vs Binlog Dump GTID)
* the actual and reported hostnames (@@hostname and @@global.report_host)
* the reported port (@@global.report_port)
* the ID and UUID of the replicas

In addition to that there are messages like this in the error log:
2021-01-27T04:06:02.569999Z 413925 [Note] [MY-011170] [Server] Start semi-sync binlog_dump to slave (server_id: 198229039), pos(, 4).

Note that this has only the ID of the server and not the hostname and/or UUID. It also depends on when the replica connected and the retention of the error log and filtering etc.

How to repeat:
See description

Suggested fix:
SELECT * FROM performance_schema.replication_clients

with:
* hostname
* server_id
* server_uuid
* protocol (Classic vs X Protocol)
* Using GTID (yes/no)
* Using semisync (yes/no)

This could replace SHOW SLAVE HOSTS (SHOW REPLICA HOSTS).
[27 Jan 2021 7:38] MySQL Verification Team
Hello Daniël,

Thank you for the reasonable feature request!

regards,
Umesh