Repository navigation
[4.2-dev] fix(test): establish the cross-CN commit fence before TestIssue28931 index queries - #32977
Merged
Merged
Conversation
…ssue28931 index queries TestIssue28931StaleUpdatePlanCannotBypassNewIndex's "regular index includes the update" subtest ran IGNORE INDEX(ix_payload) and FORCE INDEX(ix_payload) on the writer CN immediately after finishDDL() returned. finishDDL only joins the CREATE INDEX goroutine on the ddl CN, so it does not establish that the writer CN has applied and synchronized the index commit timestamp; the hinted queries could fail with error 1176 "Key 'ix_payload' doesn't exist in table 'regular_update'" instead of testing index/table result consistency. Move the existing syncAuthenticatedClusterCommit(t, ctx, cluster) call to immediately after finishDDL succeeds, before any index-dependent statement, and delete the old post-assertion fence site, matching the fence ordering already used by TestIssue32346. No sleep or retry is introduced; all assertions are unchanged. Fixes #32975
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? |
Contributor
|
This pull request is merged. |
This was referenced Nov 20, 2026
2 of 4 tasks
1 task done
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32975 (fixes the
4.2-devside; themainbranch needs the same fence and remains tracked by the issue).What this PR does / why we need it:
TestIssue28931StaleUpdatePlanCannotBypassNewIndex'sregular index includes the updatesubtest ranIGNORE INDEX(ix_payload)andFORCE INDEX(ix_payload)on the writer CN immediately afterfinishDDL()returned.finishDDL()only joins the CREATE INDEX goroutine on the ddl CN, so it does not establish that the writer CN has applied and synchronized the index commit timestamp. The hinted queries could therefore fail withError 1176 (42000): Key 'ix_payload' doesn't exist in table 'regular_update'(observed in the #32964 UT coverage run) instead of testing index/table result consistency.Move the existing
syncAuthenticatedClusterCommit(t, ctx, cluster)call to immediately afterfinishDDL()succeeds, before any index-dependent statement, and delete the old post-assertion fence site, matching the fence ordering already used byTestIssue32346AlterIndexIncludesCommittedWrites. No sleep or retry is introduced; all assertions are unchanged.Validation on Linux/amd64:
.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -v -run '^TestIssue28931StaleUpdatePlanCannotBypassNewIndex$' ./pkg/tests/issues/passed on the final revision: the parent test and all six subtests PASS (13.34s;ok github.com/matrixorigin/matrixone/pkg/tests/issues 13.412s, exit 0, no error 1176), includingregular_index_includes_the_update.gofmtandgo vet -mod=readonly ./pkg/tests/issues/clean.