[MDEV-23711] make mariabackup innodb redo log read error message more clear Created: 2020-09-10  Updated: 2023-06-29  Resolved: 2020-09-21

Status: Closed
Project: MariaDB Server
Component/s: Backup
Fix Version/s: 10.2.35, 10.3.26, 10.4.16, 10.5.7, 10.6.0

Type: Task Priority: Major
Reporter: Vladislav Lesin Assignee: Vladislav Lesin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-18611 mariabackup silently ended during xt... Closed
relates to MDEV-19492 Mariabackup hangs if table populated ... Stalled

 Description   

Currently mariabackup can fail reading InnoDB redo log during backup due to two reasons:
1) Redo log block was incompletely written by server or damaged. In this case mariabackup tries to re-read log block several times before fail.
2) Redo log block was overwritten, as it is currently implemented as circular buffer, and mariabackup can read it slower then it is written.

In both cases there will be the same error message in backup log. In the second case the workaround is to increase InnoDB redo log size. But users do not know about such workaround as they don't have clear enough error message.

mariabackup uses InnoDB function to read redo log: log_t::file::read_log_seg(). Each log block contains it's log block number which can be converted in log block LSN. The function returns error if log block LSN does no match requested LSN. In mariabackup we could get log block number from log_sys.buf and check if "read log block number LSN" - "requested LSN" > "log size", then this is the second case, and we could output error message with advise to increase redo log size.


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