Skip to content

Conversation

@zhjwpku
Copy link
Collaborator

@zhjwpku zhjwpku commented Dec 14, 2025

No description provided.

@zhjwpku zhjwpku force-pushed the add_snapshot_update branch from 3c0ef7d to 5aff2f1 Compare December 14, 2025 13:32
@zhjwpku zhjwpku force-pushed the add_snapshot_update branch from 5aff2f1 to 6c68501 Compare December 23, 2025 04:02
@zhjwpku zhjwpku force-pushed the add_snapshot_update branch 2 times, most recently from 3c9c444 to 5e28bbb Compare January 1, 2026 06:54
@zhjwpku zhjwpku marked this pull request as ready for review January 1, 2026 06:54
@zhjwpku zhjwpku force-pushed the add_snapshot_update branch 3 times, most recently from 24d976d to d5d0e20 Compare January 4, 2026 14:36
snapshot_id]() -> Result<std::unique_ptr<ManifestWriter>> {
std::string manifest_path = ManifestPath();

if (format_version == 1) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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

Copy link
Member

@wgtmac wgtmac left a 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.

@zhjwpku zhjwpku force-pushed the add_snapshot_update branch 2 times, most recently from 34a1fed to 1e47eef Compare January 8, 2026 16:06
@wgtmac wgtmac force-pushed the add_snapshot_update branch from 1e47eef to 661e15a Compare January 13, 2026 02:46
@wgtmac wgtmac force-pushed the add_snapshot_update branch from 661e15a to 1f42a1d Compare January 13, 2026 02:56

const TableMetadata& Transaction::current() const { return metadata_builder_->current(); }

std::string Transaction::MetadataFileLocation(std::string_view filename) const {
Copy link
Contributor

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.

Copy link
Contributor

@dongxiao1198 dongxiao1198 left a 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.

@wgtmac
Copy link
Member

wgtmac commented Jan 13, 2026

Thanks @zhjwpku for working on this large and complex feature and others for the review! Let me merge this to unblock other conflicting PRs.

@wgtmac wgtmac merged commit a29355d into apache:main Jan 13, 2026
10 checks passed
@zhjwpku zhjwpku deleted the add_snapshot_update branch January 13, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants