[MDEV-29581] mariadb-backup prepare lists wrong binary log position Created: 2022-09-20 Updated: 2023-09-14 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | mariabackup |
| Affects Version/s: | 10.6.9, 10.6.10 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Oli Sennhauser | Assignee: | Kristian Nielsen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux, Ubuntu 22.04, 20.04, n.a. |
||
| Attachments: |
|
| Description |
|
MariaDB Backup provides IMHO wrong binary log position in output: IMHO this is correct: shell> mariadb-backup --backup ... [00] 2022-09-20 19:00:23 >> log scanned up to (1876443359) This is still correct: SQL> SHOW MASTER STATUS;
----------------------------------
---------------------------------- But this is wrong! After prepare we get an lower/older position in the output of the prepare. shell> mariadb-backup --prepare 2022-09-20 19:01:15 0 [Note] InnoDB: Starting final batch to recover 175 pages from redo log. The output of xtrabackup_binlog_info is correct again: shell> cat xtrabackup_binlog_info So the output of prepare is misleading and thus dangerous! Either suppress it or print it correctly. Or I have a complete wrong understanding of the output... |
| Comments |
| Comment by Daniel Black [ 2023-09-13 ] |
|
acceptable - https://github.com/MariaDB/server/pull/2756 ? |
| Comment by Kristian Nielsen [ 2023-09-13 ] |
|
The problem here is a regression introduced by The correct fix thus is to revert Additionally, I have attached a test case that demonstrates the problem. Also note that the test case uses the xtrabackup_binlog_pos_innodb file. So the patch for Reverting these patches makes the attached test case pass deterministically, demonstrating that the position is correct for provisioning a new slave without locking the master, as long as DDL is avoided during the backup. |
| Comment by Kristian Nielsen [ 2023-09-13 ] |
|
So to summarize, no do not remove this information from the output. Instead, revert the patch that makes the output incorrect, and restore the functionality to write the output to file xtrabackup_binlog_pos_innodb so users don't have to rely on parsing log files. |
| Comment by Marko Mäkelä [ 2023-09-13 ] |
|
knielsen, thank you for the feedback. Without looking at the details yet, I can imagine that some rollback segment header pages could be updated for other reasons than writing the binlog offset. One example might be a ROLLBACK of a transaction. Maybe there really is no other feasible option than to revert |
| Comment by Daniel Black [ 2023-09-14 ] |
|
Thanks knielsen, I assume you are most of the way through untangling this and wish to continue? |
| Comment by Kristian Nielsen [ 2023-09-14 ] |
|
danblack Sure, I can do that. |