-
Notifications
You must be signed in to change notification settings - Fork 80
feat: add snapshot update #408
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
Conversation
3c0ef7d to
5aff2f1
Compare
5aff2f1 to
6c68501
Compare
3c9c444 to
5e28bbb
Compare
24d976d to
d5d0e20
Compare
| snapshot_id]() -> Result<std::unique_ptr<ManifestWriter>> { | ||
| std::string manifest_path = ManifestPath(); | ||
|
|
||
| if (format_version == 1) { |
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.
The related judgments for the format version (format_version) are scattered across multiple methods. Each version's logic exists in the form of if-else, encapsulating the processing logic of each version into independent implementations to avoid the expansion of if-else branches?
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.
I add MakeWriter helpers to wrap that, see #493
wgtmac
left a comment
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.
I haven't reviewed snapshot_update.h/.cc yet. Just post my findings so far.
34a1fed to
1e47eef
Compare
1e47eef to
661e15a
Compare
661e15a to
1f42a1d
Compare
|
|
||
| const TableMetadata& Transaction::current() const { return metadata_builder_->current(); } | ||
|
|
||
| std::string Transaction::MetadataFileLocation(std::string_view filename) const { |
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.
It's also used in TableMetadataUtil::NewTableMetadataFilePath, I think it can be a public static method of TableMetadataUtil. Maybe do it in another PR.
dongxiao1198
left a comment
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.
lgtm, this Finalize can be used in ExpireSnapshots also.
|
Thanks @zhjwpku for working on this large and complex feature and others for the review! Let me merge this to unblock other conflicting PRs. |
No description provided.