Repository navigation
fix: make View metadata migration idempotent - #29468
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 review at ea6f230 against base/merge-base d8152cb: no blocking finding for this bounded migration-idempotency fix.
Design: fix the template at its existing sysview owner; do not weaken exact readiness or modify the general CREATE VIEW star-freezing rule. Traced the eight projected fields into the subscription View consumer: authorization still uses the full table-function source before projection/APPLY, and all downstream identifiers remain available. Public column types and authorization are unchanged. No new migration version, metadata state machine or recovery worker is warranted for this representation repair; existing upgraded tenants remain semantically usable, and replay converges once.
QA: reviewed the admission matrix and real transactional DROP -> injected CREATE failure -> old-definition restoration -> successful retry -> replay with CREATE forbidden. The real-storage oracle closes the previous mock's circular assumption that CREATE persists its input exactly. Also checked direct/nested consumers, remote prepared SHOW after source replacement, unchanged View identity, CTAS, and same-directory/same-UUID restart with new service instances. Tests reuse existing fixtures and deterministic failure injection; cleanup/rows/statement owners and bounded contexts were traced. The added restart cost buys an actual persistence boundary, rather than duplicate happy-path coverage.
Evidence: reused the documented owning-package passes, focused two-CN race result and same-service repeated BVT comparisons/teardown, with current-head CI green. No fresh local cluster/race run is claimed. Source/docs diff-check passes; the full check reports only the three new native mo-tester result rows' trailing empty-field whitespace, not a source defect. Reviewed the SQL/golden changes separately from production and the conformance document. No material new hot-path work or performance claim.
There are no prior unresolved substantive inline requests on this PR. This approval does NOT close #29007/#26227, approve v2 activation, or turn simulated protocol responses/same-binary restart into mixed-binary evidence; those explicitly retained successor requirements remain outside this one-statement fix.
Merge Queue Status
This pull request spent 2 minutes 58 seconds in the queue, with no time running CI. ReasonPull request #29468 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #29007 and #26227; intentionally does not auto-close either issue.
This addresses a demonstrated migration-idempotency defect and adds lifecycle evidence under the merged on-demand architecture. The obsolete durable metadata recovery design is not reinstated; full mixed-binary activation remains outside this PR.
What this PR does / why we need it:
The 4.0.10 COLUMNS migration compares persisted
rel_createsqlwith its exact template. Its private subscription-view CTE usedSELECT mt.*, which CREATE VIEW correctly expanded and reformatted. Consequently, a successful migration persisted a definition unequal to its own readiness template and replay rebuilt the view.No new migration version, protocol, worker, cache, or activation state is introduced: already-upgraded templates remain semantically usable; replay of the existing migration converges to the new representation once.
Validation
Local macOS arm64, Go 1.26.4, worktree-built native libraries; CGo tests through
mo-cgo-test:./pkg/util/sysview,./pkg/bootstrap/versions/v4_0_10,./pkg/tests/upgrade— PASS. Final helper revision revalidated with the entire upgrade package.TestViewDescriptionTwoCNrace: measured 28.57s; adaptive N=1; final run 30.28s — PASS, process exit 0.Four existing upgrade-framework tests remain skipped by their original implementation; all changed named tests executed. Old templates on new binaries and injected protocol responses are not mixed-binary evidence. Full L/A/B rollout, B activation/rollback denial, late-incarnation races, and the complete restore/PITR matrix remain with the #29433 successor work, including #29440/#29443.
Self-review: no unresolved blockers for this bounded fix; not approval of the complete #29007 lifecycle or a v2 rollout.