Details

    Description

      MySQL has had the binlog_error_action variable since MySQL 5.6.22:

      binlog_error_action

      Property Value
      Command-Line Format --binlog-error-action[=value]
      Introduced 5.6.22
      System Variable binlog_error_action
      Scope Global
      Dynamic Yes
      Type Enumeration
      Default Value IGNORE_ERROR
      Valid Values
      IGNORE_ERROR
      ABORT_SERVER

      Controls what happens when the server cannot write to the binary log, which can cause the master's log to become inconsistent and replication slaves to lose synchronization. Previous releases used the name binlogging_impossible_mode.

      In MySQL 5.6, the default for binlog_error_action is IGNORE_ERROR, meaning the server logs the error, halts logging, and continues performing updates; this is to provide backward compatibility with older versions of the MySQL Server. Setting this variable to ABORT_SERVER makes the server halt logging and shut down whenever it cannot write to the binary log; this is the recommended setting, particularly in complex replication environments.

      https://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_error_action

      Is it worth porting to MariaDB?

      I think binlog_error_action=ABORT_SERVER would probably be most useful to prevent issues in complex replication environments where some errors such as full disk can cause binary logging to be completely disabled, which means that transactions which have been committed to the local server won't be able to get replication to any of the system's slaves.

      Attachments

        Issue Links

          Activity

            Elkin Andrei Elkin added a comment -

            ralf.gebhardt@mariadb.com: It makes sense to adopt the mysql option/global-var and add to it a keep-retrying policy requested by MDEV-20796. That is the latter 's scope to encompass these 2 steps.

            Elkin Andrei Elkin added a comment - ralf.gebhardt@mariadb.com : It makes sense to adopt the mysql option/global-var and add to it a keep-retrying policy requested by MDEV-20796 . That is the latter 's scope to encompass these 2 steps.

            This is currently stalled, as MDEV-24625 (at least the analysis part) should be done before this. That is, we should ensure the existing binlog error behavior is correct and consistent, before trying to extend it.

            bnestere Brandon Nesterenko added a comment - This is currently stalled, as MDEV-24625 (at least the analysis part) should be done before this. That is, we should ensure the existing binlog error behavior is correct and consistent, before trying to extend it.
            ParadoxV5 Jimmy Hú added a comment -

            (write this down before I forget again)

            The progress was to incrementally port binlog_error_action coverages by referencing the history of MySQL’s binlog.binlog_error_action MTR test.

            The first few are easy-peasy as they only concern code that warns exactly:

            Could not use %s for logging (error errno). Turning logging off for the whole duration of the MariaDB server process. To turn it on again: fix the cause, shutdown the MariaDB server and restart it.

            But then the scope of MySQL’s binlog_error_action was incrementally expanded to other points of failure and, because each had different mechanisms (in both MySQL and MariaDB), to the point they were rewriting their code to improve on their version of the MDEV-24625 situation.
            (c.c. bnestere :point_up: Their binlog_error_action’s evolution might give pointers.)

            ParadoxV5 Jimmy Hú added a comment - (write this down before I forget again) The progress was to incrementally port binlog_error_action coverages by referencing the history of MySQL’s binlog.binlog_error_action MTR test . The first few are easy-peasy as they only concern code that warns exactly: Could not use %s for logging (error errno ). Turning logging off for the whole duration of the MariaDB server process. To turn it on again: fix the cause, shutdown the MariaDB server and restart it. But then the scope of MySQL’s binlog_error_action was incrementally expanded to other points of failure and, because each had different mechanisms (in both MySQL and MariaDB), to the point they were rewriting their code to improve on their version of the MDEV-24625 situation. (c.c. bnestere :point_up: Their binlog_error_action ’s evolution might give pointers.)

            People

              ParadoxV5 Jimmy Hú
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              8 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.