Repository navigation
fix(data branch): honor table clear boundaries in DIFF and PICK - #33233
mergify[bot] merged 13 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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
Addressed the bounded PICK review finding in |
…umn rules Signed-off-by: VioletQwQ-0 <[email protected]>
Signed-off-by: VioletQwQ-0 <[email protected]>
|
mo-bot review · Commit: Review completed. Read the assessment. |
… schemas Signed-off-by: VioletQwQ-0 <[email protected]>
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 0245b168708bafc630d62bc303af2afc69540952
Assessment: request_changes
The prior ON UPDATE finding is resolved on the PR head, but the clean textual merge with the pinned target branch fails to compile. The clear-boundary design otherwise reuses the existing branch lineage and snapshot lifecycle; reconstructing visible state is needed to recover changes lost by a physical clear.
Model: gpt-6.1-terra / max
Session: 01a215d1-7203-74e1-813a-2513cddd0c27 · slot 0 · generation 15
- P1
pkg/frontend/data_branch.go:2260: Merge this head into the pinned main target e5d6f92.
Impact: The merged frontend package cannot compile, blocking the MatrixOne build and tests for the merge.
Evidence: This PR changes constructChangeHandle's tables argument to *tableStuff. The target branch independently added currentBaseChangesHandle with a tableStuff value field and initializes it with tables. The files merge without a textual conflict, but a focused build using their merged contents fails with "cannot use tables (variable of type *tableStuff) as tableStuff value in struct literal"; see target-merge-build.log and checks/1795668272780576735-2.json. Reconcile the target wrapper when rebasing, for example by passing *tables. A temporary dereference made the focused build and three relevant tests pass.
Validation:
-
The prior ON UPDATE SQL reproducer passed on the assigned head, preserving the destination timestamp. The embedded merge_issue_32003 SQL fixture also passed; see on-update-probe.log and merge-fixture.log.
-
Twelve focused tests passed across frontend, databranchutils, and sql/compile. Isolation preflight, native-input provenance, and git diff --check passed.
-
The supplied patch matches the merge-base-to-head diff apart from its final newline. All 27 changed paths and six discussion keys are recorded; receipts and logs are reconciled in validation-audit.json.
Limitations:
-
The target integration build used an overlay of the two merged frontend production files, not a full build of the merged target tree.
-
A separate bounded PICK probe with no source clear overwrote a later destination column on both the PR head and the frozen merge base. It is preexisting and is not included as a PR finding.
-
The frozen CI snapshot includes a non-required Connector/J Pool Reset E2E failure; its failure details were not supplied.
Signed-off-by: VioletQwQ-0 <[email protected]>
Signed-off-by: VioletQwQ-0 <[email protected]>
…elation Signed-off-by: VioletQwQ-0 <[email protected]>
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: ee35455eb5a9df438c3ef81947e7ba262851e253
Assessment: approve
No actionable regressions found. The clear-boundary design reuses the existing lineage and snapshot lifecycle; reconstructing visible rows is necessary to recover changes lost by physical clears. The earlier ON UPDATE and target-merge compilation findings are resolved on this head.
Model: gpt-6.1-terra / max
Session: 01a216bc-adbc-7142-8f93-6b94a5827118 · slot 0 · generation 16
Validation:
-
Isolation preflight and native-input audit passed. Focused race tests passed for clear reconciliation, historical hydration, apply writers, lineage metadata and snapshot compaction; see focused-race-retry.log, lineage-race.log and validation-audit.json.
-
The embedded issue SQL fixture, merge and keyless-row cases passed. The clear-boundary test also passed after object reclamation and service restart; see embedded-sql.log and embedded-gc.log.
-
The discussion assessment covers all eight discussion keys. git diff --check passed. The frozen CI snapshot reports successful build, unit, coverage, proxy and pessimistic multi-CN checks.
Limitations:
-
A bounded PICK without a source clear can report a conflict when the only differing destination column was added after the upper snapshot. The same SQL probe reproduced this behavior on both the reviewed head and the merge base, so it is preexisting; see bounded-probe.log and baseline-probe.log.
-
Multi-CN, released-binary upgrade and backup/restore tests were not independently run. The frozen CI snapshot does not specify whether its multi-CN jobs exercised this fixture.
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #32003
What this PR does / why we need it:
An unconditional DELETE can use the same physical table replacement path as TRUNCATE. Data Branch previously recorded that replacement as row-preserving ALTER lineage. Subsequent DIFF and PICK could retain changes from the cleared generation without seeing the implied deletions. In the reported sequence, PICK returned success without restoring the requested row.
Record clear boundaries in existing branch lineage metadata and reconstruct changes against the appropriate comparison snapshot. Keep COPY ALTER row-preserving; do not infer clear boundaries retroactively from legacy ALTER records or missing history.
Validation on
f42550e540b(basedc204213996, including #32970 and #32971):8734ac51866and were added totest/distributed/cases/git4data/branch/merge/merge_issue_32003.sql.TestDataBranchAfterTableClear/TestDataBranchClearBoundaryAfterGCpassed.merge_issue_32003,branch_rebuild_lifecycle,diff_older_ancestor_snapshotanddiff_output_as_altered_columns.Validation on
ee35455eb5a:5f5b752c299both stopped at the stale upper-snapshot mock expectation. CI for the new head is tracked separately.QA required: yes. The fix changes persisted lineage interpretation and SQL-visible Data Branch behavior. Local SQL verifies final rows and error outcomes, including restart/GC coverage. Multi-CN/Proxy on the PR head remains pending.