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

Implement binlog_space_limit

    XMLWordPrintable

Details

    Description

      Original request:
      We have a 130GB database, replicated to a backup cluster, and the binlog files consume 400GB of storage for a single day, without any option to reduce that to something more reasonable!

      Implementation guidelines:

      • Add variable to limit max binlog space (max-binlog-total-space and/or binlog_space_limit)
      • Binlog size should be checked at during server start, binlog rotation, FLUSH LOGS, when writing to binary log or when max-binlog-total-size changes value.
      • Add option --slave-connections-needed-for-purge with 1 as default. This is the minimum number of slaves that needs to be connected for binary logs to be deleted.
        The number should normally be the number of minimum expected slaves. The binary logs will not be deleted until we have at least that many slaves attached and no one is using the to-be-deleted binary log.
        For example assuming one is supposed to have 3 slaves connected to the sever. MariaDB will not delete binary logs based on size until all of them are connected at the same time and all of the slaves are requesting data from binary logs after the to-be-deleted one.
      • Add status variable 'Binlog_disk_use' that shows current binary log space usage.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              ccounotte COUNOTTE CEDRIC
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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