[MDEV-18917] Don't create xtrabackup_binlog_pos_innodb with Mariabackup Created: 2019-03-13 Updated: 2023-11-03 Resolved: 2019-03-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | mariabackup |
| Affects Version/s: | 10.4.3, 10.1.38, 10.2.22, 10.3.13 |
| Fix Version/s: | 10.2.23, 10.1.39, 10.3.14, 10.4.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Mariabackup inherited a xtrabackup_binlog_pos_innodb from Percona XtraBackup. However, this file is apparently only safe to use with Percona Server versions that have a special lockless binary log feature:
https://www.percona.com/doc/percona-xtrabackup/2.4/advanced/lockless_bin-log.html Maybe Mariabackup shouldn't create it at all? It can lead users to make dangerous assumptions. For example, some users seem to think they can use this position when they run Mariabackup with --no-lock. For example, if we take a backup with --no-lock:
And then prepare it:
Then this file is present:
|
| Comments |
| Comment by Geoff Montee (Inactive) [ 2019-03-16 ] |
|
|
| Comment by Vladislav Vaintroub [ 2019-03-16 ] |
|
GeoffMontee -it does not do anything for "lockless binlog". |
| Comment by Geoff Montee (Inactive) [ 2019-03-16 ] |
|
Hi wlad, OK, thanks. I thought I'd ask because I noticed that |
| Comment by Vladislav Vaintroub [ 2019-03-16 ] |
|
|
| Comment by Geoff Montee (Inactive) [ 2019-03-18 ] |
|
Thanks, wlad. I do see in the issue description of
You're right that the actual implementation looks much different than Percona's "LOCK TABLES FOR BACKUP". |
| Comment by Vladislav Vaintroub [ 2019-03-18 ] |
|
The "BLOCK_COMMIT" stage is, with relatively small differences, the same as FTWRL, not really "lockless". |
| Comment by Kristian Nielsen [ 2023-09-13 ] |
|
Removing this functionality is a misunderstanding, and seems a serious regression in a GA release. It is correct that obtaining the binlog position lockless in this way has some limitations. But these limitations have always been there, and while it requires some care, it does not make the given position useless. In contrast, it is the only way to get a consistent position in a fully lockless way. The limitation is that the binlog position is the position of the last DML against an InnoDB table that is included in the backup. This means that the user must avoid doing DDL or updates to the mysql.* system tables (eg. GRANT) during the backup. If that precation is taken, the position is correct. So this fix should be reverted to restore the functionality and fix the regression in a GA release. And the documentation could be updated to explain what the limitation is. |