[MDEV-25899] intermediate files operations are not protected by backup locks Created: 2021-06-11 Updated: 2021-06-20 Resolved: 2021-06-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Server |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6.2 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Vladislav Lesin | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
After
Just for the note, mariabackup parses InnoDB redo log during backup and remembers all file operations read from the log, and then copies newly created files or creates special files for renamed and deleted files, which are processed during backup prepare phase. Before It's not obvious for me how to fix it or if this is bug or not. The transformation of #sql-* file into a real tablespace should not happen, and some BACKUP STAGE , or FTWRL should prevent that last rename during backup(see The test: https://github.com/MariaDB/server/tree/10.6-MDEV-25899 |
| Comments |
| Comment by Marko Mäkelä [ 2021-06-16 ] | |||
|
For native ALTER TABLE we also have the problem that rollback is not protected by backup locks at all. The original reasoning why the rollback is not necessarily protected by MDL is that during the final phase of ALTER TABLE…LOCK=NONE the lock upgrade to MDL_EXCLUSIVE may time out, and as a result we would want to roll back the operation. This rollback may delete and rename files if the operation was a table-rebuilding ALTER.
We would invoke the rollback if there is a conflict with a backup lock, instead of waiting for the backup lock! | |||
| Comment by Marko Mäkelä [ 2021-06-16 ] | |||
|
I expect that | |||
| Comment by Sergei Golubchik [ 2021-06-20 ] | |||
|
It seems that "rollback of native ALTER TABLE" isn't in the scope of this bug report. This was specifically about #sql temporary files created by ALTER TABLE ... ALGORITHM=COPY. And this was, apparently, fixed by |