feat(query): support experimental table branch - #20403
Conversation
* support table branch fix fix fix fix fix * remove HistoryTableBranchMeta * fix * fix review comments * fix review comments * fix * fix review comments * fix * fix review comments * fix * fix * fix * fix test * fix test * resolve conflict * fix review comments
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70a7f8f7b2
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eee055f662
ℹ️ 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".
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
This PR brings the previously reviewed and merged table-branch implementation from #19551 to
main.feat_branch; this PR rebases/adapts that implementation onto the currentmainbranch.main, with compatibility updates required by changes that landed since the original review.The feature adds experimental table branches for FUSE tables: lightweight writable forks with independent snapshot histories and copy-on-write sharing of existing segments and blocks. It includes branch metadata and lifecycle APIs, branch-qualified table resolution, branch-safe vacuum/GC behavior, and protection for files still referenced by active branches or tags.
Implementation notes
vacuum2, dropped-table vacuum, and virtual-column vacuum.mainAPIs, including metadata table registration, table-cache eviction, materialized-view integration, and current meta transaction helpers.mainindependently.Tests
Validation performed:
make lintcargo checkfor meta app/API/proto conversion/schema test suite, SQL, Fuse storage, and enterprise query cratesType of change
Review context
The feature implementation was already reviewed in #19551 before being merged into
feat_branch. Reviewers can focus this round on the adaptation to currentmainand any integration changes since that review.AI assistance
main, resolving API compatibility issues, running validation, and drafting this PR summary. The responsible human reviewed the feature previously through feat(query): support experimental table branch #19551 and owns this submission.This change is