[MDEV-32939] If tables are frequently created, renamed, dropped, a backup cannot be restored Created: 2023-12-04 Updated: 2023-12-14 Resolved: 2023-12-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Storage Engine - InnoDB |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
mleich produced rr replay traces of a server and a backup session that leads to a situation where restoring the backup fails:
This is easily reproducible with the attached files. I am able to recover the backup if I rename some files before starting the restore:
Also some encryption related paths in data/backup-my.cnf may need to be adjusted. With the files renamed and the encryption parameters adjusted, the data set will recover:
The logging and recovery of DDL operations was rewritten in 10.6. Before I do not think that crash recovery is affected by this. This problem should be unique to backup and code like the following:
|
| Comments |
| Comment by Marko Mäkelä [ 2023-12-04 ] | ||||||||||||||
|
I finally found out where the information on the file name is lost. It is in deferred_spaces.add():
This assumption will obviously be violated when preparing a backup where tables by the same name have been created, renamed, and dropped. The input that produced data.tar.xz | ||||||||||||||
| Comment by Marko Mäkelä [ 2023-12-07 ] | ||||||||||||||
|
fbackup.tar.xz | ||||||||||||||
| Comment by Marko Mäkelä [ 2023-12-07 ] | ||||||||||||||
|
data-fts.tar.xz | ||||||||||||||
| Comment by Marko Mäkelä [ 2023-12-08 ] | ||||||||||||||
|
I revised the logic so that most tables in data-fts.tar.xz | ||||||||||||||
| Comment by Marko Mäkelä [ 2023-12-14 ] | ||||||||||||||
|
After a further revision, all tables of data-fts.tar.xz | ||||||||||||||
| Comment by Matthias Leich [ 2023-12-14 ] | ||||||||||||||
|
origin/10.6- |