Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5274

binlog rotation based on slave state

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None

    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/

      Attachments

        Issue Links

          Activity

            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)
            f_razzoli Federico Razzoli added a comment - 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)

            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.

            serg Sergei Golubchik added a comment - 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.

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

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

            People

              Unassigned Unassigned
              jospape Jos Pape
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.