Repository navigation
fix(table): create branches from tags with expired snapshots - #1221
Conversation
Restore snapshots preserved by tags when the live snapshot JSON has expired. Keep live snapshot copying and propagate storage failures. Cover tagged reads, source preservation, missing tags, and errors during existence checks, copying, and fallback writes. Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
JingsongLi
left a comment
There was a problem hiding this comment.
Requirement fit: SUPPORTED. Implementation: FINDINGS at 5ded5e2. Restoring a branch from a retained tag after snapshot expiry has clear end-to-end value, but the serialization fallback loses current Java snapshot metadata.
Local validation: 67 branch-related library tests and all 4 branch_from_tag integration tests passed. An additional real-file probe truncates a table, adds the operation field written by current Java to the snapshot/tag, creates a live-copy control branch, deletes the live snapshot and restores a second branch. The live control preserves operation=TRUNCATE; the expired-snapshot branch drops it and fails the same assertion. Current Java's Snapshot/Tag handling, snapshots system table and RTAS commit consumer were independently checked. Details inline. No Java RTAS workload was executed. Formatting and diff checks passed.
Restore expired snapshots from the copied tag payload instead of serializing the narrower Rust Snapshot model. Remove only tag creation and retention metadata, preserving operation and unknown snapshot fields. Cover a real truncate live/expired comparison and failures reading the copied tag. Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Use the built-in file backend for fixture commits so snapshot publication uses the atomic local-filesystem path required by current main. Derive metadata paths from each temporary table location and scope the fault-injection operator to that table, preserving all existing checks. Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Purpose
Creating a branch from a tag fails when the live snapshot JSON has expired, even though the tag still preserves the Snapshot.
Brief change log
Keep copying live snapshots when present. Otherwise, write the Snapshot parsed from the tag into the new branch. Preserve tag/schema copies and propagate storage errors.
Tests
API and Format
Unchanged.
Documentation
Not required.