Repository navigation
[4.2-dev] fix(frontend): handle missing subscriber accounts in SHOW PUBLICATIONS - #32902
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 ↓. |
|
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: c1ed30975ed4629797336e57e017544816923feb
Assessment: approve
SHOW PUBLICATIONS now omits missing subscriber IDs from subscribed_accounts and logs one warning per affected publication. It preserves publication rows, metadata, sorted names for live subscribers, and catalog errors. The fix uses the existing account-ID lookup, so a recreated account with the same name cannot inherit the old subscription.
Model: gpt-6.2-sol / xhigh
Session: 01a1eecd-3287-70c0-bb93-ab923faf5f3f · slot 0 · generation 2
Validation:
-
The focused frontend test passed all eight cases, and the full frontend suite passed 1,699 top-level tests.
-
Both MySQL regression passes succeeded on the same three-CN fixture through CN0. They verified SHOW and SHOW LIKE, preservation of orphan rows, healthy subscription reads, and cleanup between runs.
-
Verified the clean frozen checkout, matching native build inputs, and isolation preflight. Logs and matching exit-zero receipts are recorded in validation-reconciliation.json.
Limitations:
- The review exercised the public MySQL path in the embedded fixture. The IDC QA startup flow and the DROP ACCOUNT lifecycle issue tracked in #32900 remain outside this read-side validation.
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #32899
4.2-dev counterpart of #32901, using this branch's existing test fixture APIs.
What this PR does / why we need it:
SHOW PUBLICATIONSdereferences the account-ID lookup for every subscribedaccount without checking that it exists. A persisted subscription referencing a
deleted account makes the whole statement panic, including unrelated healthy
publications owned by the same publisher. MOI's Sample Data startup can therefore
fail with Error 20101.
Keep each selected publication and its metadata, but omit subscriber IDs absent
from the account lookup from
subscribed_accounts. Keep the existing sortednames for live accounts and emit one diagnostic warning per affected publication.
Do not fall back to the stored account name: a recreated same-name account has
a different identity and must not inherit the old subscription.
This is a read-side resilience fix only. It does not mutate
mo_subs, changepublication authorization, mask catalog query errors, or fix orphan creation
tracked by issue #32900. No schema migration or operational data cleanup is
included.
Tests cover healthy sorted subscribers, no subscribers, missing-only and mixed
subscribers, same-name/new-ID identity, preserved publication rows/metadata,
catalog errors and cancellation. A public MySQL integration test reuses the
existing three-CN fixture (MySQL client on CN0), injects only the observed orphan precondition via its internal
executor, and verifies plain SHOW/LIKE, unchanged catalog rows and healthy
subscription reads. It explicitly checks cleanup and repeats on the same instance.
This supplies the public SQL proof without adding a probabilistic DROP ACCOUNT
race or a production bypass for catalog write protection.
Tested with (macOS arm64; Go 1.26.4; repository-built native libraries):
All passed locally on 4.2-dev base
54956dc8e9e1315e38956b0ba3662e3f8a51b6c4. The frontend package passed in15.046s; the SQL test passed both repetitions in 14.16s. The identical unsafe
lookup was also reproduced on unchanged main: healthy controls passed and the
missing-account unit case panicked. No QA/production data or deployment was
changed. GitHub CI is separate and may still be pending.