feat(query): support experimental table branch#19551
feat(query): support experimental table branch#19551zhyass wants to merge 2 commits intodatabendlabs:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9a61930b6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let tags = catalog | ||
| .list_table_tags(ListTableTagsReq { | ||
| table_id: self.get_id(), | ||
| include_expired: true, | ||
| }) |
There was a problem hiding this comment.
Protect branch snapshots before purging base history
This purge protection path only enumerates table tags, so active branch references are never added to protected_segments/snapshot_files_to_gc. Branch snapshots are created from base snapshots and can still reference older base-table segments, so running purge/vacuum on the base table can delete files that a live branch still needs, causing branch reads to fail after cleanup.
Useful? React with 👍 / 👎.
| // Protect tags on base table as well. | ||
| let catalog = ctx.get_catalog(self.get_table_info().catalog()).await?; | ||
| let tags = catalog | ||
| .list_table_tags(ListTableTagsReq { | ||
| table_id: self.get_id(), | ||
| include_expired: false, | ||
| }) |
There was a problem hiding this comment.
Include branch refs in orphan-file reachability scan
The referenced-segment collection used by orphan GC now unions root snapshots with tags but still omits branch refs, yet downstream cleanup treats this set as authoritative when deleting orphan segments/blocks. After introducing table branches, this can incorrectly purge files that remain reachable from a branch snapshot (for example in do_gc_orphan_files), breaking branch queries post-vacuum.
Useful? React with 👍 / 👎.
0ce4207 to
3ce87cc
Compare
🤖 CI Job Analysis
📊 Summary
❌ NO RETRY NEEDEDAll failures appear to be code/test issues requiring manual fixes. 🔍 Job Details
🤖 AboutAutomated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed). |
3ce87cc to
b1a380e
Compare
update update update fix test fix test fix test update update update fix test fix test fix test update update fix fix update
fix fix update update update fix update update update update update update fix fix update update
b1a380e to
8690b60
Compare
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Tests
Type of change
This change is