-
Notifications
You must be signed in to change notification settings - Fork 465
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
[persist] Design for backup/restore #18157
Conversation
Persist state is a mix of stuff in CRDB and stuff in S3. This complicates restoring from backup: if we restore CRDB to an old state, the blobs it references might be deleted. It's possible to "undelete" deleted blobs in S3 by deleting a delete marker from an unversioned bucket. This PR implements that logic as a CLI tool, and implements a basic test that restores a CRDB state and checks that the database is in the expected state after the CLI runs. ### Motivation See #18157 for the design. ### Tips for reviewer One subtlety here is that we can't rely on the usual state iterators, since those rely on the existence of rollups, which may not exist yet. The current draft just iterates over the diffs manually. I have not yet tested this tool against a real environment. I will probably wait for at least a first pass of code review first! Co-authored-by: Philip Stoev <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, left a couple high level comments on a couple sections that might have rotted since it was first written. Will circle back for the full in-depth review (might be next week, unless there's a pressing need, in which case ping me)
Oops, thanks for catching that! No pressing need; just doing some housekeeping. (This predates the new design process, so the schedule's a bit loose, but anyways it feels like it's ready to go.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
As always, fantastic work! Your design docs are always so clear and well-reasoned
Known-desirable: see #17605 for context. ### Tips for reviewer [Click here for the rendered version.](https://github.com/bkirwi/materialize/blob/backup-design/doc/developer/design/20230315_backup_restore.md) I've brought this closer to the standard design doc template, and filled in a few details that were left open earlier this year.
Motivation
Known-desirable: see MaterializeInc/database-issues#5119 for context.
Tips for reviewer
Click here for the rendered version.
Edit: I've brought this closer to the standard design doc template, and filled in a few details that were left open earlier this year.
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way) and therefore is tagged with aT-proto
label.