Skip to content

test: synchronize cross-CN FK regression setup - #28511

Merged
XuPeng-SH merged 8 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-27618-7e12a94e
Sep 10, 2026
Merged

XuPeng-SH merged 8 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-27618-7e12a94e

Conversation

@gouhongshen

@gouhongshen gouhongshen commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR fixes:

Related to #27618

What this PR does / why we need it:

Root cause

TestIssue26875ReplaceMaintainsIndexedForeignKeyChildren creates and seeds the self-referencing tables on CN0, then immediately prepares the REPLACE statement on CN1. There was no causal barrier requiring CN1 to observe CN0's committed DDL before planning the statement. Depending on catalog/logtail scheduling, CN1 could prepare against a snapshot that predates the table. The issue was observed as a missing child row and later recurred as MySQL error 1146 (table does not exist) in the same self-referencing loop. The REPLACE and foreign-key execution paths are not changed by this issue.

Change

After each CN0 table creation and seed, the test executes the existing select mo_ctl('cn', 'SYNCCOMMIT', '') control through CN1 before PrepareContext. This publishes the latest commit timestamp across CN services and establishes the required catalog/logtail ordering without sleeps, retries, or a fallback path. The setup remains split across CN0 and CN1 so the test continues to cover the intended cross-CN behavior.

Issue-to-test proof

Validation

The PR tree is synchronized with matrixorigin/matrixone main at f6aa238d6d535a344ee41d23d5f3bbcf9ecd7912; the current head is 32e44616917ac0f447785431cd9ddc27d831170d. All rebase validation used the repository CGo test wrapper.

  • Pre-change baseline: the exact target passed 20/20 locally on the prior main; the intermittent CI failure was not reproduced locally.
  • Post-rebase exact target, normal mode: -count=20 passed in 53.988s.
  • Post-rebase exact target, race mode: -race -count=1 passed in 24.749s.
  • Post-rebase owning package ./pkg/tests/issues: passed in 115.851s.
  • git diff --check origin/main...HEAD: passed.
  • BVT is not applicable: this is an embedded-cluster UT fixture-ordering defect, no production SQL/API behavior changed, and the focused UT exercises both exact self-table/index variants through real SQL frontends.

Residual risk

No production code or public behavior changed. The test adds one bounded existing synchronization control per self-referencing-table variant and preserves the original two-CN topology. Full CI may still expose unrelated embedded-cluster or coverage flakes outside this issue's scope.

@mergify mergify Bot added the kind/test-ci label Sep 9, 2026
@matrix-meow matrix-meow added the size/XS Denotes a PR that changes [1, 9] lines label Sep 9, 2026
@gouhongshen
gouhongshen force-pushed the agent/issue-27618-7e12a94e branch from 648c601 to ab74a02 Compare September 9, 2026 09:13
@gouhongshen
gouhongshen force-pushed the agent/issue-27618-7e12a94e branch from ab74a02 to 5d28899 Compare September 9, 2026 10:12
@gouhongshen
gouhongshen marked this pull request as ready for review September 9, 2026 10:15
@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 →

@gouhongshen
gouhongshen force-pushed the agent/issue-27618-7e12a94e branch from 846bed3 to c41548a Compare September 9, 2026 16:57
@gouhongshen
gouhongshen force-pushed the agent/issue-27618-7e12a94e branch from c41548a to ea8f64b Compare September 9, 2026 18:30
@gouhongshen
gouhongshen force-pushed the agent/issue-27618-7e12a94e branch from ea8f64b to 809e5d9 Compare September 9, 2026 20:13
@mergify

mergify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-10 01:24 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-09-10 02:49 UTC · at e82f561dab969d48b02786724c02517cdd235fc4

This pull request spent 1 hour 24 minutes 38 seconds in the queue, with no time running CI.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Reason

Pull request #28511 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants