Bug #88029 Allow to purge bunch of transactions while slave is running
Submitted: 9 Oct 2017 12:14
Reporter: Sveta Smirnova (OCA) Email Updates:
Status: Open Impact on me:
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.7.19, 8.0.3 OS:Any
Assigned to: CPU Architecture:Any

[9 Oct 2017 12:14] Sveta Smirnova
Originally reported at https://bugs.launchpad.net/percona-server/+bug/1722221

With multi-source replication, when you want to add new master to existing slave you may need to purge old GTIDs from backup. If you have small number of transactions you can easily skip them by inserting empty transactions while second replication channel is running. But if you have to inject really large number of transactions (say, 1M) it is impractical even with help of scripting/utilities.

How to repeat:
Use a server actively. Try to setup new replication channel on it without stopped writes and another replication channel.

Suggested fix:
Please implement one of:

- allow committing a [empty] gtid set instead of a single gtid, though this would require changes in how binlogs are parsed
- allow appending gtid sets to gtid_purged, even if just for UUIDs that aren't currently represented in the extant sets.
- allow changing purged while transactions are open, as long as no purge is running, as those transactions would only update gtid_executed and the binary log, and don't actually change gtid_purged.

Probably https://bugs.mysql.com/bug.php?id=84994 maybe implemented in a way which allow to solve this issue with multi-channel replication setup.