Bug #51014 | mysqld continues operation without logging when binlogs cannot be written! | ||
---|---|---|---|
Submitted: | 9 Feb 2010 8:26 | Modified: | 2 Jun 2014 10:31 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.1, 5.4 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[9 Feb 2010 8:26]
Shane Bester
[9 Feb 2010 9:51]
Valeriy Kravchuk
Thank you for the feature request.
[9 Feb 2010 10:04]
Luis Soares
See also: WL#1790.
[6 May 2010 6:57]
Zhenxing He
The feature to allow DBA to specify how to act when binlog is not available will not be handled by bug#46166. set back to verified.
[27 Dec 2013 20:34]
Yoshinori Matsunobu
Is this a feature request? This issue is very serious once it happens... Nothing (not limited to SQL thread, but from all clients) is binlogged but updates succeed without errors. If this happens on master, slaves won't receive anything.
[27 Dec 2013 20:41]
Mark Callaghan
How can this possibly be a feature request? If mysqld cannot write the binlog then either mysqld must stop or commit & auto-commit statements must fail.
[3 Jan 2014 0:03]
Domas Mituzas
what masters Mark Callaghan and Yoshinori Matsunobu said.
[6 May 2014 4:01]
Laurynas Biveinis
Related to this feature request: bug 68953
[2 Jun 2014 10:31]
David Moss
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.
[2 Jun 2014 10:33]
David Moss
Documented as follows in the 5.7.5 changelog: Replication: The new system variable binlog_impossible_mode controls what happens if the server cannot write to the binary log, for example, due to a file error. The default for binlog_impossible_mode is IGNORE_ERROR, meaning the server logs the error, halts logging, and continues updates to the database. Setting this variable to ABORT_SERVER makes the server halt logging and shut down the server if it can not write to the binary log. And added content is available in the documentation here: http://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_binlog_i...
[6 Aug 2014 17:26]
Laurynas Biveinis
$ bzr log -n0 -r 5936 ------------------------------------------------------------ revno: 5936 committer: Sujatha Sivakumar <sujatha.sivakumar@oracle.com> branch nick: Bug11758766_mysql-5.6 timestamp: Wed 2014-05-14 12:01:43 +0530 message: Bug#11758766:MYSQLD CONTINUES OPERATION WITHOUT LOGGING WHEN BINLOGS CANNOT BE WRITTEN Problem: ======== If an error occurs that prevents mysqld writing to the binary logs (disk full, readonly file system, etc) then the logs are disabled and operations continue. This can lead to out of sync slaves and improper backups. Analysis: ========= When binlogging becomes impossible due to readonly file system at present the binlog gets closed along with an error message in error log which says binlog is turned off for the whole duration of the server to fix the cause shutdown the server and fix the problem. The master continues without binlogging which causes the slave to go out of sync. At present there is no way user can control the behaviour so it will be better to let the user provide an option to stop the server immediately on the error. Fix: ==== A new option "binlogging_impossible_mode" has been introduced whose values are "IGNORE" or "ABORT". When binlogging becomes impossible if user sets the variable to "ABORT" server will stop if user sets it to "IGNORE" binlog will be turned off and server will continue.
[7 Aug 2014 6:56]
Laurynas Biveinis
$ bzr log -n0 -r 6045 ------------------------------------------------------------ revno: 6045 committer: Sujatha Sivakumar <sujatha.sivakumar@oracle.com> branch nick: Bug11758766_mysql-5.6 timestamp: Mon 2014-06-30 18:46:22 +0530 message: Bug#11758766:MYSQLD CONTINUES OPERATION WITHOUT LOGGING WHEN BINLOGS CANNOT BE WRITTEN Fixing a typo.
[7 Aug 2014 6:57]
Laurynas Biveinis
$ bzr log -n0 -r 6049 ------------------------------------------------------------ revno: 6049 committer: Venkata Sidagam <venkata.sidagam@oracle.com> branch nick: 5.6 timestamp: Tue 2014-07-01 14:03:12 +0530 message: Bug#11758766:MYSQLD CONTINUES OPERATION WITHOUT LOGGING WHEN BINLOGS CANNOT BE WRITTEN Post push fix. Reverting back the file permissions to 0664
[14 Oct 2014 15:45]
David Moss
Posted by developer: Reopened by merge, no change required for docs. Reclosing.
[4 Nov 2014 18:09]
Eric Bergen
The fix for this is a variable? Who was arguing on the side of letting the master continue without logging? What is the default?
[9 Feb 2015 7:52]
Valeriy Kravchuk
See http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_e... for the details on default value etc.
[8 Jan 2016 18:03]
Morgan Tocker
As a small update to this issue, the default for binlog_error_action changed to ABORT_SERVER for MySQL 5.7. Thank you for helping to improve MySQL! http://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_binlog_e...