Skip to content

[4.2-dev] test: wait for publication commits across CNs - #33273

Merged
XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:fix/4.2-publication-commit-visibility
Nov 26, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:fix/4.2-publication-commit-visibility

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Test and CI

Which issue(s) this PR fixes:

Related to #32744.

What this PR does / why we need it:

The x86 coverage job for #32497 observed zero active grants where TestDropAccountConcurrentPublicationGrant expected one. The retry of ALTER PUBLICATION had returned successfully on CN1 before the test queried mo_subs on CN0. A new transaction on CN0 can still read at its local applied logtail timestamp.

Use the existing syncCommit control at the test's cross-CN handoffs. Wait after publication creation before opening the subscriber on the other CN. After the two concurrent DDLs return, wait before the rollback check and retry, then wait for the final commit before reading the catalog. The DROP and ALTER still contend for the original locks in the same order.

Validation

TestDropAccountConcurrentPublicationGrant passed 12 of 12 times with -cover on Linux x86_64. All 12 runs exercised the transaction retry. A separate -race run also passed and exercised the retry. Local runs used a TCP-only embedded fixture.

Original x86 coverage failure.

The concurrent DROP ACCOUNT and ALTER PUBLICATION regression reads catalog state on a different CN from the ALTER writer. Synchronize applied commits at cross-CN handoffs so the retry and assertions see the intended state, with the concurrent phase unchanged.
@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 →

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@XuPeng-SH

XuPeng-SH commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: 230cfeeaf1848ccf12667e7d60f8ab2a4f4b1b20

"interrupted"

@XuPeng-SH
XuPeng-SH merged commit 86a8673 into matrixorigin:4.2-dev Nov 26, 2026
19 of 21 checks passed
@XuPeng-SH
XuPeng-SH deleted the fix/4.2-publication-commit-visibility branch November 26, 2026 02:12

This branch was successfully deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants