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

Implement binlog_expire_logs_seconds for purging of binary logs

Details

    Description

      Oracle MySQL implemented binary log expiration period in seconds via binlog_expire_logs_seconds variable and expire_logs_days is deprecated in MySQL 8.
      It would be nice to have similar option for MariaDB Server. Expiring binary logs within seconds is extremely useful in high volume writes on master and where disk space is limited option.

      Attachments

        Issue Links

          Activity

            Elkin Andrei Elkin added a comment -

            For the documentation, the patch 49ff2cbff4
            1. changes the type of expire_log_days to double to allow factional part of the whole day.
            Backward compatible setting to an integer value is preserved (no need any post-upgrade actions)
            2. adopts from the upstream binlog_expire_logs_seconds as an alias to expire_log_days so
            the two variables show the same value just in different units and formats.

            The changes to --help for expire_log_days can be seen in the patch:

            "If non-zero, binary logs will be purged after expire_logs_days "

            • "days; possible purges happen at startup and at binary log rotation",
              + "days; It and binlog_expire_logs_seconds are aliases, such that "
              + "changes in one are converted into the other, presentable as a "
              + "decimal value with 1/1000000 of the day precision; possible "
              + "purges happen at startup and at binary log rotation",

            The upstream new binlog_expire_logs_seconds is described as

            + "If non-zero, binary logs will be purged after "
            + "binlog_expire_logs_seconds seconds; It and expire_logs_days are "
            + "aliases, such that changes in one are converted into the other. "
            + "Possible purges happen at startup and at binary log rotation.",

            the type is double,
            the valid range is from 0 to 99*86400 seconds.
            Values from 1 to 11 are rounded to zero 0.000000 of expire_log_days.

            Elkin Andrei Elkin added a comment - For the documentation, the patch 49ff2cbff4 1. changes the type of expire_log_days to double to allow factional part of the whole day. Backward compatible setting to an integer value is preserved (no need any post-upgrade actions) 2. adopts from the upstream binlog_expire_logs_seconds as an alias to expire_log_days so the two variables show the same value just in different units and formats. The changes to --help for expire_log_days can be seen in the patch: "If non-zero, binary logs will be purged after expire_logs_days " "days; possible purges happen at startup and at binary log rotation", + "days; It and binlog_expire_logs_seconds are aliases, such that " + "changes in one are converted into the other, presentable as a " + "decimal value with 1/1000000 of the day precision; possible " + "purges happen at startup and at binary log rotation", The upstream new binlog_expire_logs_seconds is described as + "If non-zero, binary logs will be purged after " + "binlog_expire_logs_seconds seconds; It and expire_logs_days are " + "aliases, such that changes in one are converted into the other. " + "Possible purges happen at startup and at binary log rotation.", the type is double, the valid range is from 0 to 99*86400 seconds. Values from 1 to 11 are rounded to zero 0.000000 of expire_log_days .
            greenman Ian Gilfillan added a comment -

            I suggest not using the word "alias" in the descriptions, as this implies that they are the same, and if a user doesn't look beyond that, they could end up specifying the wrong units. You could replace it with the word "linked", or "forms of aliases".

            greenman Ian Gilfillan added a comment - I suggest not using the word "alias" in the descriptions, as this implies that they are the same, and if a user doesn't look beyond that, they could end up specifying the wrong units. You could replace it with the word "linked", or "forms of aliases".
            Elkin Andrei Elkin added a comment -

            Thanks, Ian! Agreed here. sujatha.sivakumar, could you please pick it up to a patch that fixes the valid ranges?

            Elkin Andrei Elkin added a comment - Thanks, Ian! Agreed here. sujatha.sivakumar , could you please pick it up to a patch that fixes the valid ranges?

            Thank greenman and Elkin. I will do the changes.

            sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - Thank greenman and Elkin . I will do the changes.
            sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - - edited Hello Elkin Please find the following post push fixes. https://github.com/MariaDB/server/commit/2ea32e65a34ba065b3dd63d4c80071404dad1ca8 BuildBot: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.6-MDEV-19371 Please review them. Thank you.

            People

              sujatha.sivakumar Sujatha Sivakumar (Inactive)
              muhammad.irfan Muhammad Irfan
              Votes:
              3 Vote for this issue
              Watchers:
              13 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.