[MDEV-5274] binlog rotation based on slave state Created: 2013-11-11  Updated: 2023-02-14

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Jos Pape Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: replication

Issue Links:
Blocks
is blocked by MDEV-4698 With GTID replication, relay logs can... Open
PartOf
is part of MDEV-19140 Full synchronous replication Open

 Description   

Binlog rotation based on slave state.
if one of the slaves is down, do not purge binlog files.
if all slaves are health, purge binlog to keep the number of binlog files to a absolute minimum.

Usualy mysql replicates with binlog files.
But they get cleaned up based on a log rotation script, not based on the fact is there still nessesary or not.
I build a PHP script that connects to alles slaves of the master to check if there in sync or not and my script
cleans up the binlog files as soon as there no longer needed. (http://forums.mysql.com/read.php?52,210712)
I would love to see this functionality build in into my mariaDB servers.

note by Anders Karlsson:
As for your ideas on Log rotation, I can see this as being useful,
and possibly this could be considered for inclusion in MariaDB. I
suggest you report it as a feature request in the MariaDB bugs database:
https://mariadb.com/kb/en/reporting-bugs/



 Comments   
Comment by Federico Razzoli [ 2015-11-09 ]

Very useful. I have 2 subrequests:

  • an optional minimum of files stored (maybe all slaves are light-fast, but I want to keep some binlogs as backup)
  • an optional maximum (even if a slave is dead, disk space has a limit)
Comment by Sergei Golubchik [ 2015-11-10 ]

This assumes all slaves are connected to the master and the I/O thread is lagging behind, right?
So

  • master doesn't know about the slave that is disconnected
  • if I/O thread has caught up then it has everything in the relay log and the master can purge binlogs. But then — MDEV-4698 — the slave might need to re-download binlogs and they've been deleted.

It seems that MDEV-4698 needs to be fixed first before master can purge binlogs based on the slave I/O thread position.

Comment by Brandon Nesterenko [ 2023-02-14 ]

This task is complementary to full-synchronous replication, and may make use of the work done for MDEV-21322 as well.

Generated at Thu Feb 08 07:03:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.