New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlccl: handle descriptor changes in MVCC BACKUP/RESTORE #21717
Conversation
Review status: 0 of 9 files reviewed at latest revision, 6 unresolved discussions, all commit checks successful. pkg/ccl/sqlccl/backup.go, line 125 at r1 (raw file):
finds pkg/ccl/sqlccl/backup.go, line 128 at r1 (raw file):
"a a" pkg/ccl/sqlccl/backup.go, line 130 at r1 (raw file):
Relvent is misspelled pkg/ccl/sqlccl/backup.go, line 143 at r1 (raw file):
not -> no pkg/ccl/sqlccl/backup.go, line 192 at r1 (raw file):
Why don't need to care about interestingParents here too? pkg/ccl/sqlccl/restore.go, line 84 at r1 (raw file):
In the case where asOf is less than the first b.StartTime, this will set lastBackupDesc to last descriptor in backupDescs from 5 lines above. Is that correct? Comments from Reviewable |
d0f4471
to
350780c
Compare
Review status: 0 of 9 files reviewed at latest revision, 6 unresolved discussions, some commit checks pending. pkg/ccl/sqlccl/backup.go, line 125 at r1 (raw file): Previously, mjibson (Matt Jibson) wrote…
Done. pkg/ccl/sqlccl/backup.go, line 128 at r1 (raw file): Previously, mjibson (Matt Jibson) wrote…
Done pkg/ccl/sqlccl/backup.go, line 130 at r1 (raw file): Previously, mjibson (Matt Jibson) wrote…
Done. pkg/ccl/sqlccl/backup.go, line 143 at r1 (raw file): Previously, mjibson (Matt Jibson) wrote…
Done. pkg/ccl/sqlccl/backup.go, line 192 at r1 (raw file): Previously, mjibson (Matt Jibson) wrote…
yep, nice catch -- I meant to do this and forgot once I actually wrote it up. While we've already used interestingParents above to seed interestingIDs with any tables that were in an interesting DB at the beginning of the interval -- and have added all tables in the matched set at the end of the window too -- if a table is moved into the interesting parents during the window, we need to note that as well -- not only is that and interesting change, but we need to then expand interestingIDs in case it is also deleted. Also added more comments to this effect. pkg/ccl/sqlccl/restore.go, line 84 at r1 (raw file): Previously, mjibson (Matt Jibson) wrote…
That is not correct, but we have a check at the very beginning of RESTORE ... AS OF SYSTEM TIME that we have an MVCC backup covering that time. Comments from Reviewable |
099fdd2
to
60a63b0
Compare
Okay, added tests with adding and drop tables and indexes, truncating and moving a table in and out of the target DB, RFAL. The main missing piece left is non-DB backups, where we'll need #21895, but I don't want to block on that -- as discussed with @dianasaur323, the |
e56dfbd
to
986bb9a
Compare
I think? This stuff is complicated. Review status: 0 of 9 files reviewed at latest revision, 7 unresolved discussions, all commit checks successful. pkg/ccl/sqlccl/backup.go, line 354 at r2 (raw file):
Can you list the conditions where this happens in the comment? pkg/ccl/sqlccl/restore.go, line 110 at r2 (raw file):
revsions Comments from Reviewable |
Release note (enterprise change): experimental ‘revision_history’ backup/restore handles schema changes.
Review status: 0 of 9 files reviewed at latest revision, 7 unresolved discussions. pkg/ccl/sqlccl/backup.go, line 354 at r2 (raw file): Previously, mjibson (Matt Jibson) wrote…
Done. pkg/ccl/sqlccl/restore.go, line 110 at r2 (raw file): Previously, mjibson (Matt Jibson) wrote…
Done. Comments from Reviewable |
Release note (enterprise change): experimental ‘revision_history’ backup/restore handles schema changes.