Repository navigation
refactor(view): serve opt-in introspection through shared schema requests - #30578
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
|
mo-bot review · Commit: Review belongs to an older commit; it is not a review of the current head. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: ddd7db0af161f3d9d8cb54eac8aa49149e56d1a4
Assessment: approve
Reviewed the complete 24-file delta and affected callers. The opt-in design appropriately reuses S2 ownership, authorization and budgets, preserves legacy behavior, and bounds metadata output. No actionable unresolved findings.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Verified frozen head, matching patch and unchanged source; all 11,529 tracked build inputs match. Isolation preflight and repository-owned native build passed.
-
Focused tests passed across plan, table_function, apply, sysview and compile. Full normal table_function/apply/sysview suites passed.
-
Both native frontend integration tests passed, covering SHOW/DESC, relational metadata queries, history, subscriptions, tenant isolation, role exclusion and physical-catalog controls.
-
Three request-lifecycle tests passed 100 race repetitions each. Full race suites for plan, table_function and apply passed.
-
Reconciled command/source/exit receipts with retained logs: /home/xupeng/.local/state/mo-bot/jobs/44625c49b012c1584b255516/attempt-1/validation-manifest.json. Complete review record: review-notes.md.
Limitations:
-
No live opt-in multi-CN, mixed-version rollout or production performance benchmark; later activation and rollout acceptance remain separate.
-
Raw CI logs and author validation receipts were unavailable. Author coverage totals were not independently verified.
-
The linked issue body was not supplied; its available contract was reviewed through the frozen design documents and PR description.
Merge Queue Status
This pull request spent 6 hours 58 minutes 18 seconds in the queue, including 57 minutes 27 seconds running CI. Required conditions to merge
|
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed ddd7db0 independently against the approved shared-request contract and S4 consumer boundaries. No blocking finding in the opt-in path.
The request marker is not authority: consumer identity and per-root authorization remain checked. The common request serializes binding with cancellation-aware waits, shares existing work/deadline/memo limits and does not own the parent transaction. Bulk skipping uses binding-error provenance rather than swallowing root/provider/authorization errors. TVF result release covers completion, error, early termination, Reset and Free; APPLY preserves bounded source pages instead of coalescing them.
Reviewed local/subscription placement, historical template adaptation, SHOW rebind/dependency behavior, ordinary-table/default compatibility and the lifecycle/public/native tests. Passing exact-head CI and source-qualified evidence are reused; no new local service or real mixed-version run is claimed. This approval does not authorize default activation or completion of S5/S6/S8 rollout gates.
…d scope with PR #30578 (#30739) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [x] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes #30668 ## What this PR does / why we need it: #30668 asks whether merged PR #30578 was intended to close only the S2 opt-in work or all of S4 (#29439), and requires the remaining adapter/consumer contract **and tests** to stay tracked before S5 (#29440) is treated as unblocked. This PR answers with a reconciliation record **plus executable contract tests** (no production code changes). **Reconciliation record** (`docs/design/CLAUDE_2026-10-20-view-metadata-s4-reconciliation.md`): - **Scope answer**: #30578 intended to close the full S4 opt-in consumer wiring (C04–C07, C11–C13, C16, C17 per the S1 consumer map). Its "S2 boundary" wording refers to reusing the approved S2 request boundary, not to narrowing S4. - **Final consumer classification audit** (required by the S1 design at S3/S4 closure): every executable `mo_catalog.mo_columns` query call site and every S4-scope View column/definition consumer, classified as derived, physical-compatible, regression-control, or S5-owned. The audit finds no remaining required consumer that still observes stale persisted View columns. Physical-compatible readers include SHOW SEQUENCES/SHOW INDEX (C17), CDC primary-key probes (`relkind='r'` only), the auto-increment RESET ownership check, vector-index metadata shape probes, snapshot sequence restores, upgrade version checks, engine replication/record layers, and offline checkpoint tools. - **Explicit D03 raw-catalog policy statement**: raw `mo_columns` keeps physical snapshot semantics; internal consumers requiring current columns use the logical entry points; description reads never persist derived results. The D03 replacement of #26227's persistence acceptance is recorded as closed (owner clarification 2026-09-30; issue closed 2026-10-10). - **Residual tracking**: S3 #29438 was delivered by #30551 (merged 2026-10-21) and is closed; C14/`BuildTableDefByMoColumns` disposition is recorded in the S3 consumer document. The only remaining dependency item for S5 #29440 is its own scope. **Contract tests** (pin the reconciliation so S5 cannot regress it silently): - `TestDerivedColumnsTemplateSeparatesPersistedAndDerivedAuthority` (pkg/util/sysview): the I_S COLUMNS templates (current/V100/V109/V41-derived) keep user Views out of the persisted `mo_columns` branch and re-add them only through on-demand description; subscription candidates are authorized and filtered left of the APPLY; historical single-branch templates gain no subscription rows. - `TestShowColumnsSplitsPhysicalAndLogicalAuthority` (pkg/sql/plan): under one opt-in metadata request, DESC/SHOW [FULL] COLUMNS/SHOW COLUMN_NUMBER plans for a user View never scan `mo_columns`, while ordinary tables keep their physical `mo_columns` read without any active request. - `TestViewColumnsSkipsNullCandidatesYieldsEmptyResult`, `TestViewColumnsStartRejectsCancelledContext` (pkg/sql/colexec/table_function): filtered candidates yield empty scans instead of errors; cancellation at scan start aborts description with the context error. Audit baseline: `c0e826888b` (mo/main, 2026-10-21); revision log in the document records the two earlier review completions. Validation (darwin/arm64, repository CGo wrapper, worktree-built native libraries): - Full normal tests passed for `pkg/sql/plan`, `pkg/sql/colexec/table_function`, and `pkg/util/sysview`. - Focused `-race` runs passed for the new plan/table_function contract tests plus the existing concurrent ViewMetadata request tests. - gofmt, `go vet`, and `git diff --check` passed. - No production code changed; BVT/native integration evidence previously reported by #30551/#30578 is not re-claimed. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #29439
What this PR does / why we need it:
Route explicitly opted-in View introspection consumers through the approved S2 derived-schema request boundary. Default SQL behavior remains unchanged; this does not activate the full v2 rollout or absorb S3.
information_schema.columnsconsumers.mo_catalog.mo_columnsphysical/MVCC semantics and ordinary-table fast paths.Validation (Go 1.27.1, repository CGo wrapper and worktree-built native libraries):
pkg/sql/plan,pkg/sql/colexec/table_function,pkg/sql/colexec/apply,pkg/util/sysview,pkg/sql/compileandpkg/frontend.view_metadata_on_demand.sqlpassed normal mo-tester comparison twice on the same owned single-CN instance, 64/64 each run, with database/snapshot teardown assertions. This network BVT validates default compatibility; the new opt-in path is covered separately by native SQL integration.8ef2eaf4d923; after syncing to57fb9530859d, semantically unaffected evidence was reused and focused ViewMetadata/ViewSchema plus the new upstream PREPARE/error and session-variable regressions passed for plan/frontend.git diff --checkpassed.Limitations: two-CN scope-placement unit tests passed, but no live multi-CN or mixed-version rollout was exercised. No default activation, durable refresh removal, or S5/S6/S8 acceptance is claimed.