1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-34389 Avoid log overwrite in early recovery

- InnoDB tries to write FILE_CHECKPOINT marker during
early recovery when log file size is insufficient.
While updating the log checkpoint at the end of the recovery,
InnoDB must already have written out all pending changes
to the persistent files. To complete the checkpoint, InnoDB
has to write some log records for the checkpoint and to
update the checkpoint header. If the server gets killed
before updating the checkpoint header then it would lead
the logfile to be unrecoverable.

- This patch avoids FILE_CHECKPOINT marker during early
recovery and narrows down the window of opportunity to
make the log file unrecoverable.
This commit is contained in:
Thirunarayanan Balathandayuthapani
2024-06-20 17:54:57 +05:30
parent 6cecf61a59
commit ab448d4b34
3 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,8 @@
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
CREATE TABLE t1(f1 INT NOT NULL, f2 TEXT)ENGINE=InnoDB;
# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
INSERT INTO t1 SELECT seq, repeat('a', 4000) FROM seq_1_to_1800;
# restart: --debug_dbug=+d,before_final_redo_apply --innodb_log_file_size=8M
# restart: --innodb_log_file_size=10M
DROP TABLE t1;