Skip to content

fix(frontend): tolerate deleted accounts in publication subscribers - #32903

Merged
XuPeng-SH merged 1 commit into
matrixorigin:v4.2.8-hotfixfrom
mzy-gith:fix/32899-publication-deleted-account
Nov 18, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:v4.2.8-hotfixfrom
mzy-gith:fix/32899-publication-deleted-account

Conversation

@mzy-gith

Copy link
Copy Markdown

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #32899

What this PR does / why we need it:

SHOW PUBLICATIONS dereferenced an absent account while rendering subscriber names. If a deleted account still had a subscription row, one unrelated publication caused the entire query to panic.

Skip only subscriber names whose account is no longer present. Preserve healthy publications, subscription names, query errors, and all relationship metadata. This fixes the read-path panic; it does not repair or delete stale subscription relationships.

The regression mixes one healthy subscriber with a deleted account. On the original production path it reproduces the same nil-pointer panic at publication_subscription.go:1624; after the fix it returns the publication with only the healthy subscriber name.

Validation on hotfix source c66030006fcc30f3f987be34c5981ab5c1d5bdf0:

.agents/skills/mo-dev/scripts/mo-cgo-test \
  -run '^(Test_doShowPublicationsSkipsDeletedSubscriberAccount|Test_doAlterPublication|Test_doShowPublicationCoverage|Test_checkColExists|Test_extractPubInfosFromExecResultOld)$' \
  -count=1 -timeout=10m ./pkg/frontend

Passed in 1.421s.

.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=20m ./pkg/frontend

Passed in 18.489s. Native dependencies were built using the repository's pinned thirdparties and cgo targets. gofmt and git diff --check pass.

The hotfix source was tested locally on Darwin/arm64. No QA image or production deployment is performed by this PR; the shared-environment memory pressure and UC authentication instability are separate unresolved issues.

🤖 Generated with Claude Code

@mzy-gith
mzy-gith requested a review from XuPeng-SH as a code owner November 18, 2026 15:51
SHOW PUBLICATIONS previously dereferenced a missing account when stale subscription metadata referenced a deleted account. Skip only those stale subscriber names, preserve healthy publications and subscribers, and add a mixed healthy/dangling regression that panics on the original path.

Fixes matrixorigin#32899

Co-Authored-By: Kimi <[email protected]>
@mergify mergify Bot added the kind/bug Something isn't working label Nov 18, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


mzy seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mergify

mergify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@XuPeng-SH

XuPeng-SH commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: a8f65384ec242a56d73f1bf035a0508359f0506c

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: a8f65384ec242a56d73f1bf035a0508359f0506c

Assessment: approve

The v4.2.8 hotfix fixes the SHOW PUBLICATIONS panic reported in #32899. It uses the existing account ID map to skip missing subscriber accounts and preserve live names, ordering, and publication metadata. The change is confined to rendering the result and requires no catalog migration.

Model: gpt-6.2-sol / xhigh

Session: 01a1ee7f-fdcb-7b83-ad57-3b17a0e9d494 · slot 1 · generation 1

Validation:

  • Verified the frozen head, merge base, clean checkout, patch identity, whitespace, and runtime isolation. See scope.log, diff-check.log, preflight.log and checks/1795021277395571862-3.json, checks/1795021277518543487-2.json and checks/1795021277313395939-2.json.

  • Built native prerequisites from the hotfix head and verified that the full frontend package passed under test-exec, including Test_doShowPublicationsSkipsDeletedSubscriberAccount. The regression checks that the mixed live and deleted subscriber fixture returns the publication and its live subscriber. See native-inputs.txt, native-build.log, frontend.log and checks/1795021328736833386-2.json and checks/1795021584728683211-2.json.

  • The frozen CI snapshot reports success for the shared build, x86 unit tests, and both multi-CN BVT jobs. All four discussion entries are accounted for.

Limitations:

  • Local orphan coverage used mocked catalog results at the SHOW PUBLICATIONS execution handler. The frozen BVT statuses provide broader SQL coverage.

@XuPeng-SH
XuPeng-SH merged commit 5c16f56 into matrixorigin:v4.2.8-hotfix Nov 18, 2026

This branch was previously deployed

1 inactive deployment
ci — a8f65384 Deployed Nov 18, 2026 by mzy-gith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants