Skip to content

[4.2-dev] fix(test): establish the cross-CN commit fence before TestIssue28931 index queries - #32977

Merged
XuPeng-SH merged 1 commit into
4.2-devfrom
fix/32975-test-commit-fence-4.2
Nov 20, 2026
Merged

XuPeng-SH merged 1 commit into
4.2-devfrom
fix/32975-test-commit-fence-4.2

Conversation

@XuPeng-SH

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 #32975 (fixes the 4.2-dev side; the main branch needs the same fence and remains tracked by the issue).

What this PR does / why we need it:

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 therefore fail with Error 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 after finishDDL() succeeds, before any index-dependent statement, and delete the old post-assertion fence site, matching the fence ordering already used by TestIssue32346AlterIndexIncludesCommittedWrites. 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), including regular_index_includes_the_update.
  • gofmt and go vet -mod=readonly ./pkg/tests/issues/ clean.

…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-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 added the kind/bug Something isn't working label Nov 20, 2026
@matrix-meow matrix-meow added the size/XS Denotes a PR that changes [1, 9] lines label Nov 20, 2026
@mergify

mergify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

This branch was previously deployed

1 inactive deployment
ci — 861c8fef Deployed Nov 20, 2026 by XuPeng-SH
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/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants