Repository navigation
Description
Parent Issue
Parent issue: #29440 (S5), under #29433.
Detail of Subtask
Resolve the findings from S5 validation as one coordinated repair and revalidation effort. This is the remediation tracker, not a replacement for the S5 acceptance matrix or a claim that S5 has passed.
Confirmed defects
| Finding | Reproduction and actual result | Required behavior |
|---|---|---|
| F1 — Historical subscription reads can retain withdrawn authorization | After withdrawing publication membership, removing the View from its table scope, or dropping the publication, current information_schema.columns returns 0 rows but the named-snapshot query still exposes a column of width 8. An old REPEATABLE-READ transaction also exposed a SELECT/prepared-read path after withdrawal. |
Historical schema/data visibility must not revive withdrawn current authorization. Cover metadata, direct reads, prepared reads, and transactions opened before withdrawal. |
| F2 — Historical subscription metadata and data select different sources | After remapping the publication to another database, historical SELECT/prepared SELECT reads the admitted alternate source (remapped-value, declared width 37), while historical I_S reports the original source's width 8. |
Data and metadata must use the same source identity and historical definition under an explicitly agreed source-selection contract; see the separate contract decision below. |
| F3 — Qualified publisher View incorrectly depends on a subscriber-local database | A published View referring to publisher_db.src fails in the subscriber with ERROR 1049: Unknown database publisher_db. Creating an empty subscriber-local database with that name makes the same query return 42. |
Resolve the admitted publisher source without requiring a local shadow database. Existing canonical report: #30696; track its repair here rather than filing another duplicate. |
F1–F3 have locally validated, unpublished WIP repairs and regression tests. They are not merged fixes; keep the acceptance items open until the final repair is delivered and verified.
Observed compatibility discrepancies — decisions required, not assumed new regressions
- SHOW/DESC wire headers (F4). Row values match, but the released binary reports
STRING/0while the observed newer implementation reportsVAR_STRING/4294967295; JDBC reports[1,0,0]versus[12,-1,0]. The change was traced to fix: make SHOW metadata identifiers safe #31033 (42b5912ac3bd118b59730e0ab0b668886be049aa). MySQL 8.4.10 uses different types/widths for different SHOW columns, so neither uniform old nor uniform new behavior establishes the intended contract. Decide the external type/length contract before changing output or goldens; preserve the identifier-safety repair associated with [Bug]: SHOW metadata must report valid table columns and identifiers accurately #30545. - sys reading another account's snapshot: I_S namespace mismatch. sys can SELECT the target tenant's historical View data, and historical raw catalog rows filtered to the target account exist, but
information_schema.columnsreturns no columns for both the View and its base table. Reproduced with independent mysql clients on macOS and Linux. Decide whether this explicit snapshot selects the target metadata namespace or whether a caller-namespace restriction is intentional. Do not globally change the authorization principal to the snapshot owner. This differs from [Bug]: sys-created account-scoped PITR/snapshots are invisible to the tenant (SHOW PITR/SNAPSHOTS omit them) #31429, which concerns the tenant'sSHOW SNAPSHOTS/SHOW PITRlisting. - Historical publication physical-source semantics. The existing ordinary path selects the currently admitted source at authorization snapshot A, then reads that source's history at data snapshot T. The redesign's historical-physical-source/current-coverage contract is different. Agree which implementation the acceptance case targets; a PASS for ordinary remapping does not prove the redesigned contract. Do not silently implement all of docs: redesign ordinary view metadata and semantic activation #31573 as part of this repair.
Minimal F1 reproduction: metadata after membership withdrawal
Run the blocks using the indicated accounts, with fresh fixture names.
-- sys
CREATE ACCOUNT s5_min_sub ADMIN_NAME='admin' IDENTIFIED BY '111';
CREATE DATABASE s5_min_pub;
USE s5_min_pub;
CREATE TABLE src(private_column VARCHAR(8));
INSERT INTO src VALUES ('old');
CREATE VIEW v AS SELECT private_column FROM src;
CREATE PUBLICATION s5_min_publication DATABASE s5_min_pub ACCOUNT s5_min_sub;
-- s5_min_sub / admin / accountadmin
CREATE DATABASE subscribed FROM sys PUBLICATION s5_min_publication;
CREATE SNAPSHOT s5_min_history FOR ACCOUNT;
-- sys
ALTER PUBLICATION s5_min_publication ACCOUNT DROP s5_min_sub;
-- subscriber: SELECT should be denied; both metadata counts should be zero
SELECT * FROM subscribed.v {snapshot='s5_min_history'};
SELECT COUNT(*) FROM information_schema.columns
WHERE table_schema='subscribed' AND table_name='v';
SELECT COUNT(*) FROM information_schema.columns {snapshot='s5_min_history'}
WHERE table_schema='subscribed' AND table_name='v';
-- Pre-repair result: current=0, historical=1. Expected: 0/0.
-- subscriber cleanup
DROP SNAPSHOT s5_min_history;
-- sys cleanup
DROP PUBLICATION s5_min_publication;
DROP DATABASE s5_min_pub;
DROP ACCOUNT s5_min_sub;Also retain the distinct table-scope withdrawal, publication deletion, regrant, old-transaction/prepared-read, and deleted-before/created-after historical-alias controls.
Minimal sys → tenant snapshot namespace reproduction
-- sys
CREATE ACCOUNT s5_gap_min ADMIN_NAME='admin' IDENTIFIED BY '111';
-- s5_gap_min / admin / accountadmin
CREATE DATABASE s5_gap_min_db;
CREATE TABLE s5_gap_min_db.src(x VARCHAR(8));
INSERT INTO s5_gap_min_db.src VALUES ('old');
CREATE VIEW s5_gap_min_db.v AS SELECT x FROM s5_gap_min_db.src;
SELECT COUNT(*), MAX(character_maximum_length)
FROM information_schema.columns
WHERE table_schema='s5_gap_min_db' AND table_name='v' AND column_name='x';
-- 1, 8
-- sys
CREATE SNAPSHOT s5_gap_min_snapshot FOR ACCOUNT s5_gap_min;
SELECT x FROM s5_gap_min_db.v {snapshot='s5_gap_min_snapshot'};
-- old
SELECT COUNT(*) FROM mo_catalog.mo_columns {snapshot='s5_gap_min_snapshot'}
WHERE att_database='s5_gap_min_db' AND att_relname='v' AND attname='x'
AND account_id=(SELECT account_id FROM mo_catalog.mo_account
WHERE account_name='s5_gap_min');
-- 1
SELECT COUNT(*), COALESCE(MAX(character_maximum_length),0)
FROM information_schema.columns {snapshot='s5_gap_min_snapshot'}
WHERE table_schema='s5_gap_min_db' AND table_name='v' AND column_name='x';
-- Actual: 0, 0. Consumer-consistency oracle: 1, 8 (namespace contract pending).
-- Repeating for table_name='src' also returns no columns.
DROP SNAPSHOT s5_gap_min_snapshot;
DROP ACCOUNT s5_gap_min;Tenant-owned same-name snapshots remain isolated; another tenant's snapshot access is rejected. Preserve these negative controls in any namespace repair. No unpatched same-HEAD baseline was run for this observation, so it is not attributed to the subscription WIP.
Acceptance / implementation dependencies, not reproduced runtime defects
- Production mode/activation: the tested ordinary validation selectors remain unselected; integration fixtures are not production activation. Obtain and validate the actual production candidate under the parent work. Existing persisted-expression/admission/snapshot lifecycle protections are live responsibilities, not blanket-inactive cleanup targets.
- Deeper interrupted-upgrade windows: a real released-data test now proves failure/cancellation after route commit and before cluster entries, recovery and another restart. Tenant-DDL interruption, hard crash and unknown-commit are not proved by it. Specify the required windows and add deterministic evidence where required.
- Supported version policy: reconcile S5's mixed-binary/rollback wording with shutdown-only upgrade and no downgrade. Do not introduce unsupported mixed deployments or unreleased-main upgrade routes to satisfy ambiguous wording.
Unified acceptance checklist
- Deliver F1–F3 together with the relevant maintained regressions, including [Bug]: database-level subscription cannot query a View with a qualified publisher table name #30696; do not drop previously validated repairs.
- Decide and enforce the SHOW/DESC wire type/width contract, with strict protocol/JDBC checks separate from row-only BVT.
- Decide and resolve the cross-account snapshot metadata namespace discrepancy for both tables and Views, preserving current caller authorization and tenant isolation.
- Record the historical publication source/coverage contract and test data/metadata coherence against that contract.
- Retain failure-after-output, cancellation, transaction ownership and exactly-once cleanup tests; no error-to-successful-EOF fallback.
- Resolve or explicitly retain the production activation and deeper-upgrade-window dependencies; never relabel missing evidence PASS.
- Integrate one agreed upstream baseline and produce revision/binary/mode-specific affected validation, including supported release upgrade/restore evidence where invalidated.
- Return the consolidated resolution and remaining blockers to the S5 acceptance matrix before claiming [Subtask]: Validate on-demand View metadata across DDL, security, restore, and version boundaries #29440 complete.
Describe implementation you've considered
Reuse existing ownership boundaries: historical alias identity at T, current publication membership/table scope at A, and the admitted source's definitions/data at T for the ordinary path. Borrow the statement authorization epoch; independently own the authorization transaction; preserve the caller-owned data transaction. Reuse canonical subscription admission for SELECT/prepared/old-transaction paths. Fix qualified publisher routing at the existing planner boundary without relaxing unrelated cross-database or physical-source-owner restrictions.
Keep golden-output and namespace decisions explicit. A namespace fix must not become an authorization-identity switch. No new persistent authorization cache/worker is needed.
For upgrade testing, do not wrap v4_0_7.Handler indiscriminately: pointer-identity checks select the production phased path. The validated early-interruption probe uses the existing decision-file FileService dependency instead, preserving handler identity. A deeper fault seam needs its own reviewed boundary and must not change the path being tested.
Additional information
Evidence identity and limits
- Pre-repair subscription failures were recorded at
2b16c3abc620a02cacd081f27ef9c14b2cc335ef; the old-RR SELECT counterexample was additionally found during the repair iteration. Final local repair and supplemental evidence uses52cbba793b9a36b9d5d442bbded32d88f296e761plus unpublished WIP, not clean HEAD or current latest main. - macOS/arm64 and Linux/arm64, Go 1.27.1, ordinary isolated LOG/TN/CN services. Integration-only evidence is tracked separately.
- Key repair evidence: subscription BVT 58/58 ×2 strict and ×2 nometa, full public subscription probe 67/67, focused/full-owning race validation; new failure-closure tests pass, including focused race ×100.
- Snapshot supplement: scope BVT 54/54 ×2; independent client probe 43/45, with exactly the two cross-account I_S discrepancies above.
- Real official v4.2.7 (
260678bace0177678255089a23d0fe7d54cfc745) shutdown upgrade 19/19, persistent restart 12/12, old SQL-dump restoration 11/11. Each released-data copy was verified against 130 file hashes before startup. - Real route-commit interruption: normal/race measurement/race repeat each 1/1 PASS; retained route 10001, final tenant count 2/2. Ordinary binary follow-up 19/19 + 12/12 also passed. This is not proof of later tenant/unknown-commit windows.
- Exact Linux ordinary binary SHA256:
092b59bbe6219ec47853ae289a0bf69d5d078f58d720c18e96912d793e6a4270. Logs, source overlays and data copies are retained locally; the reproductions and essential outcomes are included here so the issue does not depend on inaccessible local file links. No PR has been published.
This issue does not authorize/implement S6 performance work, S8 rollout/refresh retirement, S9 physical cleanup, or unrelated partition/procedure/UDF/warning compatibility changes.
Activity
fix(frontend): validate cached subscription aliases at captured snaps…
test(view): align wire assertions and isolate cached alias fixture
fix(sysview): adapt filtered snapshot column metadata templates
test: isolate borrowed MERGE transaction phase budgets
fix(sql): route subscription metadata through admitted source owners
test: give independent database cleanup separate deadlines
fix(view): align historical authorization and metadata compatibility (#…
XuPeng-SH commentedon Nov 8, 2026
Merged-repair scope update (not S5 acceptance): #32328 merged into main as
ee21c57da4ca5743da43cdd437cf60ccfa6725c9on 2026-11-08 at 06:41 UTC. The delivery covers historical current-authorization/source coherence, qualified published View routing, explicit account-snapshot metadata namespace, and the per-column SHOW/DESC wire contract. The later PR review explicitly resolves the earlier F2 foreign-source-owner finding; that old review is not a current counterexample to this merge.The PR author reports ordinary-service metadata/authorization/header BVT 204/204 ×2 (subscription 125/125 ×2) at
6544a37a0b, scoped protocol/prepared/race tests, and earlier supported-release upgrade/restart/restore results. These are author-reported results, not tests executed by this update; no local MatrixOne verification was run here, and the full strict-metadata suite is not claimed green.This consolidated issue remains with development because its explicit acceptance scope still retains production candidate/activation, deeper interruption-window decisions/evidence, supported-version policy reconciliation and return of the consolidated resolution to S5. The merged PR expressly excludes the separate historical-physical-source redesign and production activation. Those remaining dependencies must not be marked PASS by this scope update.
The concrete qualified-publisher View defect #30696 has separately been handed to Ariznawlll for QA on this merged repair, with fresh-fixture, clone, source-update and authorization boundary checks requested. That transfer does not complete this tracker or #29440.