Repository navigation
test: synchronize cross-CN FK regression setup - #28511
Conversation
648c601 to
ab74a02
Compare
ab74a02 to
5d28899
Compare
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? |
846bed3 to
c41548a
Compare
c41548a to
ea8f64b
Compare
ea8f64b to
809e5d9
Compare
Merge Queue Status
This pull request spent 1 hour 24 minutes 38 seconds in the queue, with no time running CI. Waiting for any of
All conditions
ReasonPull 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.
HintYou 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. Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Related to #27618
What this PR does / why we need it:
Root cause
TestIssue26875ReplaceMaintainsIndexedForeignKeyChildrencreates and seeds the self-referencing tables on CN0, then immediately prepares theREPLACEstatement 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 beforePrepareContext. 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
self_setnull_skandself_setnull_ukcreate/seed on CN0, synchronize commit visibility through CN1, prepare and executeREPLACEon CN1, and assert that childid=2remains withpid IS NULLand count 1. The surrounding regression test retains its existing indexed foreign-key set-null/cascade assertions.Validation
The PR tree is synchronized with
matrixorigin/matrixonemainatf6aa238d6d535a344ee41d23d5f3bbcf9ecd7912; the current head is32e44616917ac0f447785431cd9ddc27d831170d. All rebase validation used the repository CGo test wrapper.-count=20passed in 53.988s.-race -count=1passed in 24.749s../pkg/tests/issues: passed in 115.851s.git diff --check origin/main...HEAD: passed.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.