Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-28994 Backup of memory-mapped log is corrupted
An interface to use memory-mapped I/O on the InnoDB redo log that is stored in persistent memory was introduced in commit 685d958 (MDEV-14425). log_t::attach(): In mariadb-backup --backup, never attempt to use memory-mapped I/O for reading the log file of the server. xtrabackup_copy_logfile(): Assert !log_sys.is_pmem() and remove the code to deal with a memory-mapped log. This fixes a race condition scenario of the following type: 1. Backup parsed a mini-transaction from the memory-mapped buffer. This took some time. 2. Meanwhile, the server might have overwritten this portion of the circular log_sys.buf. 3. Backup copied the data to the output file while or after the server had overwritten this portion of the file. 4. Backup failed to notice that a log overrun occurred. The symptom of this was that a mariadb-backup --prepare of the log failed. In the analyzed case, the error message was: [ERROR] InnoDB: Missing FILE_CHECKPOINT(...) This will also make it possible to run mariadb-backup --backup under "rr replay".
- Loading branch information
Showing
2 changed files
with
3 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters