[MDEV-20796] Add an option to keep retrying when MariaDB encounters a full disk error while trying to open a new binary log file Created: 2019-10-10  Updated: 2023-12-22

Status: Open
Project: MariaDB Server
Component/s: Replication, Variables
Fix Version/s: 11.5

Type: New Feature Priority: Major
Reporter: Valerii Kravchuk Assignee: Andrei Elkin
Resolution: Unresolved Votes: 3
Labels: None

Issue Links:
Blocks
is blocked by MDEV-17856 Port binlog_error_action from MySQL Open
Duplicate
Relates
relates to MDEV-22594 consolidate server transactional logs Open

 Description   

MariaDB already retries writes when full disk situation is encountered while writing to the existing binary log file. See https://mariadb.com/kb/en/library/using-and-maintaining-the-binary-log/#effects-of-full-disk-errors-on-binary-logging:

"If MariaDB encounters a full disk error while trying to write to a binary log file, then it will keep retrying the write every 60 seconds. Log messages will get written to the error log every 600 seconds."

This is a request to add an option (maybe set by default) to get the same behavior for the opening new binary log file case, instead of current:

"...if MariaDB encounters a full disk error while trying to open a new binary log file, then it will disable binary logging entirely."

Disabling binary logging prevents further point in time recovery even after disk space is freed and logging is again enabled.

See also related MDEV-17856. When that feature is implemented and IGNORE_ERROR is set, retries should continue for opening new binary log as well.



 Comments   
Comment by Andrei Elkin [ 2020-09-11 ]

The 60 sec sleep and 600 sec period warning, it's done in the ever lasting loop only interrupted
when the write is finally completed.

Comment by Andrei Elkin [ 2020-09-11 ]

valerii: Strictly speaking PITR can't be 100% with this requirement, if the max retry policy will allow to commit
upon reaching the max with no success to log. That is some number of trx:s can be lost in binlog.
Sure that is still better than currently.

The same max retry policy should apply to binlog rotating thread as well. So it may error out eventually, which won't lead
to the persistent read-only mode.

I hope this short remark goes inline with your thinking.

Cheers.

Generated at Thu Feb 08 09:02:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.