[MDBF-513] Mydumper: Add SEQUENCEs support Created: 2022-12-02 Updated: 2023-03-03 Resolved: 2023-03-03 |
|
| Status: | Closed |
| Project: | MariaDB Foundation Development |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Andrew Hutchings | Assignee: | Andrew Hutchings |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 2.75d | ||
| Original Estimate: | 3h | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Mydumper needs to support MariaDB's SEQUENCEs for backup and restoration. |
| Comments |
| Comment by Andrew Hutchings [ 2022-12-02 ] |
|
Development is mostly done in https://github.com/linuxJedi/mydumper/tree/mariadb-sequences Current issue is with myloader, SEQUENCEs need to be restored before tables. This is not yet expressible in myloader which tries to restore everything in parallel. I have an idea on how to resolve this which I am passing by David Ducos. |
| Comment by Andrew Hutchings [ 2022-12-05 ] |
|
Second issue to contend with, a relative reference to a SEQUENCE in `nextval` turns into an absolute one including the schema name. This means that backup/restore into a different database breaks. Discussions ongoing on how to solve these two issues. |
| Comment by Andrew Hutchings [ 2023-01-24 ] |
|
`nextval` issue is solved using a regex filter. David wants some retry code in there so tables that fail due to missing sequence are retried after the initial table threads have run. |
| Comment by Andrew Hutchings [ 2023-01-31 ] |
|
Some more goundwork has been laid and merged in. The MariaDB detection in mydumper now works correctly and the table detection queries for MariaDB have been changed so that sequences and system version tables can be detected correctly. |
| Comment by Andrew Hutchings [ 2023-02-22 ] |
|
David has done the final parts of this, it is currently in review. |
| Comment by Andrew Hutchings [ 2023-03-03 ] |
|
This has been merged upstream. |