[MDEV-21611] mariabackup should update binlog position in InnoDB during prepare Created: 2020-01-30 Updated: 2024-01-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Backup, mariabackup, Storage Engine - InnoDB |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Mariabackup currently stores the backup's binary log position in the file xtrabackup_binlog_info. https://mariadb.com/kb/en/files-created-by-mariabackup/#xtrabackup_binlog_info InnoDB also stores the data's corresponding binary log position in its global tablespace. It seems as though mariabackup does not currently update the binary log position stored in InnoDB during the prepare. This has a tendency to confuse users, since they see mismatching binary log positions. For example, they might see something like this in the prepare output written by mariabackup:
And they might see a mismatched binary log position in xtrabackup_binlog_info:
To prevent confusion, when mariabackup prepares a backup, it should probably parse the binary log position from xtrabackup_binlog_info, and then use that position to update the binary log position in InnoDB. |
| Comments |
| Comment by Vladislav Lesin [ 2020-09-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mariabackup must not update binlog position during prepare, as it fetches it under either FTWRL (10.[23]) or under BLOCK_COMMIT(10.4+), which must block any binary log updates. This is more likely the bug on server-side locking. We already found similar bug - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Almeida (Inactive) [ 2020-11-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Folks I ran into this today while attempting to rebuild a host for one of our paying customers.
Took backup from slave host #1, so I could rebuild the slave host #2 and point it to master:
Prepare log from slave #2:
xtrabackup_slave_info:
I set the coordinates as indicated and attempted to start replication by pointing to the master, which failed as shown below: I redacted creds for obvious reasons
|