[MDEV-28446] mariabackup prepare fails for incrementals if a new schema is created after full backup is taken Created: 2022-04-22 Updated: 2022-11-09 Resolved: 2022-05-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | mariabackup |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9 |
| Fix Version/s: | 10.2.44, 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4, 10.8.3, 10.9.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Rick Pizzi | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 7 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
If a new schema with at least one table is created after a full backup is taken, but before the incremental is taken, the backup cannot be restored because incremental prepare fails. mariabackup prepare fails with : Error on rename ..... (errno: 20 "Not a directory" ) The issue seems to be that mariabackup prepare expects the folder for the new schema to be already there, but it isn't because the schema is created after the full is taken, so can't be found in the full backup. This is critical as it breaks backup restores in presence of incrementals when the above condition is met (which is all but rare). How to repeat: 1. take a full backup |
| Comments |
| Comment by Alexander Barkov [ 2022-04-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The problem is not repeatable with versions between 10.2 and 10.5. Stably repeatable with 10.6 and 10.9. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This MTR test demonstrates the problem:
The output is:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
serg, please review a patch: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2022-04-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Repeatable with 10.2 with a different test:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2022-04-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
serg, this is a patch for 10.2: https://github.com/MariaDB/server/commit/5d1ae4f4c71743ce60e7ab218b33deecec4c4050 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2022-05-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
5d1ae4f4c71743ce60e7ab218b33deecec4c4050 is ok to push | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2022-05-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pushed to 10.2. |