Bug #89142 Make FLUSH RELAY LOGS work for Group Replication.
Submitted: 8 Jan 2018 22:09 Modified: 30 Apr 2019 15:41
Reporter: Jean-François Gagné Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S4 (Feature request)
Version:5.7.20, 8.0.3 OS:Any
Assigned to: CPU Architecture:Any

[8 Jan 2018 22:09] Jean-François Gagné
Description:
Hi,

In Bug#89141, I use the sequence of commands “STOP GROUP_REPLICATION; START GROUP_REPLICATION;” to rotate the relay logs.  This is a devious usage of those commands and it takes a lot of time to execute, but I needed to do that as FLUSH RELAY LOGS does not work for Group Replication (I get below when I try).

> FLUSH RELAY LOGS for channel 'group_replication_applier';
ERROR 3139 (HY000): FLUSH RELAY LOGS cannot be performed on channel 'group_replication_applier'.

Please consider implementing "FLUSH RELAY LOGS" for Group Replication.

Many thanks,

JFG

How to repeat:
Not a bug but a feature request.
[10 Jan 2018 12:57] MySQL Verification Team
Hello Jean,

Thank you for the report and feature request!

Thanks,
Umesh
[10 Jan 2018 12:58] MySQL Verification Team
Taken from Bug#89141

Attachment: 89141_5.7.20.results (application/octet-stream, text), 46.86 KiB.

[30 Apr 2019 15:41] Nuno Carvalho
Changed on 8.0.16 by BUG#92526: MAKE GR REPLICATION CHANNELS ROTATE RELAY LOG ON FLUSH LOGS

Previously, relay logs could not be rotated manually for the Group
Replication group_replication_applier channel using the FLUSH RELAY LOGS
statement. The restriction has now been removed, and the FLUSH RELAY LOGS
statement and corresponding internal requests now operate on the
group_replication_applier channel as for any other channel, with the
exception that if the request is received while a transaction is being
applied, the request is performed after the transaction ends. The requester
must wait while the transaction is completed and the rotation takes place.
This behavior prevents transactions from being split, which is not permitted
for Group Replication.