Feature request: allow dynamic revert of "Turning logging off for the whole duration of the MySQL server process."

Bug #1418934 reported by Peiran Song
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Triaged
Wishlist
Unassigned

Bug Description

There is an upstream bug describing a dangerous server behavior: when binary logging is turned off due to disk full or file permission etc, the server allows writes without binlogging: https://bugs.mysql.com/bug.php?id=51014. The fix is adding a new variable in 5.7 to either IGORE or ABORT in case of impossible binlogging.

The error log has:
[ERROR] Could not open ./mysql-bin.000006 for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.

The question and feature request here is, can we allow binlogging to be turned back on dynamically once the cause is fixed?

We had a customer case where it was likely that mysql-bin.index file's permission was not right. Then a subsequent 'flush logs' gave us the above error and binlogging was stopped. We had to restart the server to get things back which was disruptive. Why a restart is needed? It felt like that a 'flush logs' command should be able to verify binlogging possbility and resume binlogging whenever possible.

Tags: i50691
tags: added: i50691
Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Verified with PS 5.6.22,

mysql> show global variables like 'binlog_error%';
+---------------------+--------------+
| Variable_name | Value |
+---------------------+--------------+
| binlog_error_action | IGNORE_ERROR |
+---------------------+--------------+

With above settings, if anything wrong with permissions of mysql-bin.index i.e
-rw-rw---- 1 nilnandan nilnandan 38 Feb 11 10:33 mysql-bin.index

and we'll run flush logs, it will give error,

mysql> flush logs;
ERROR 29 (HY000): File './mysql-bin.index' not found (Errcode: 13 - Permission denied)
mysql>

After setting proper permissions, when we'll run again "flush logs", it doesn't give error but its not enable binlogging.

mysql> flush logs;
Query OK, 0 rows affected (0.00 sec)

For starting binlogging again , we have to restart mysql server. so, I agree with this feature request that if binlogging will be on dynamically without restarting mysql server, it will be helpful.

Changed in percona-server:
status: New → Confirmed
Changed in percona-server:
importance: Undecided → Wishlist
status: Confirmed → Triaged
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2457

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.