Repository navigation
fix: preserve snapshot parent identity in data branch - #26310
mergify[bot] merged 2 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed at head 253d3fc. Snapshot-aware source resolution preserves the historical parent table identity for table- and database-level branches, while the non-snapshot path remains unchanged. Full pkg/frontend tests, the targeted issue_26120 regression, and go vet for the affected packages passed locally.
Merge Queue Status
This pull request spent 1 hour 56 minutes 37 seconds in the queue, including 39 minutes 53 seconds running CI. Required conditions to merge
|
…6310) `DATA BRANCH` already clones table data from the requested snapshot, but branch bookkeeping resolved the source name again without that snapshot. If the source table had been dropped and recreated under the same name, ancestry metadata and the branch-protection snapshot recorded the new table ID while retaining the old timestamp. This change resolves the bookkeeping source with the same snapshot carried by the clone receipt. Both `mo_branch_metadata.p_table_id` and the matching branch snapshot `obj_id` therefore refer to the historical table generation that supplied the cloned rows. The embedded regression covers table-level and database-level branches after same-name recreation. It verifies historical copied rows, both persisted parent IDs, and successful downstream `DATA BRANCH DIFF`. Approved by: @XuPeng-SH
…6310) `DATA BRANCH` already clones table data from the requested snapshot, but branch bookkeeping resolved the source name again without that snapshot. If the source table had been dropped and recreated under the same name, ancestry metadata and the branch-protection snapshot recorded the new table ID while retaining the old timestamp. This change resolves the bookkeeping source with the same snapshot carried by the clone receipt. Both `mo_branch_metadata.p_table_id` and the matching branch snapshot `obj_id` therefore refer to the historical table generation that supplied the cloned rows. The embedded regression covers table-level and database-level branches after same-name recreation. It verifies historical copied rows, both persisted parent IDs, and successful downstream `DATA BRANCH DIFF`. Approved by: @XuPeng-SH
…6310) `DATA BRANCH` already clones table data from the requested snapshot, but branch bookkeeping resolved the source name again without that snapshot. If the source table had been dropped and recreated under the same name, ancestry metadata and the branch-protection snapshot recorded the new table ID while retaining the old timestamp. This change resolves the bookkeeping source with the same snapshot carried by the clone receipt. Both `mo_branch_metadata.p_table_id` and the matching branch snapshot `obj_id` therefore refer to the historical table generation that supplied the cloned rows. The embedded regression covers table-level and database-level branches after same-name recreation. It verifies historical copied rows, both persisted parent IDs, and successful downstream `DATA BRANCH DIFF`. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
issue #26120
What this PR does / why we need it:
DATA BRANCHalready clones table data from the requested snapshot, but branch bookkeeping resolved the source name again without that snapshot. If the source table had been dropped and recreated under the same name, ancestry metadata and the branch-protection snapshot recorded the new table ID while retaining the old timestamp.This change resolves the bookkeeping source with the same snapshot carried by the clone receipt. Both
mo_branch_metadata.p_table_idand the matching branch snapshotobj_idtherefore refer to the historical table generation that supplied the cloned rows.The embedded regression covers table-level and database-level branches after same-name recreation. It verifies historical copied rows, both persisted parent IDs, and successful downstream
DATA BRANCH DIFF.Testing
go build ./pkg/frontendgo vet ./pkg/frontend ./pkg/tests/issues.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=600s ./pkg/frontend.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -run '^TestIssue26120SnapshotBranchKeepsHistoricalParentIdentity$' -timeout=300s ./pkg/tests/issues.agents/skills/mo-dev/scripts/mo-cgo-test -race -count=1 -run '^TestIssue26120SnapshotBranchKeepsHistoricalParentIdentity$' -timeout=360s ./pkg/tests/issues.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -run '^TestIssue26114CrossAccountBranchUsesTargetQuotaAndOwnership$' -timeout=300s ./pkg/tests/issuesQA required: yes. Please verify table-level and database-level snapshot branches after dropping and recreating a same-name source table, including ancestry/protection metadata and a subsequent DIFF.