Skip to content

test: reduce race fixture work and strengthen regression coverage - #29520

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/optimize-race-ut-critical-path
Sep 30, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
XuPeng-SH:codex/optimize-race-ut-critical-path

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Sep 30, 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 #28538 (assigned to XuPeng-SH; tracks the unsharded race UT embedded-stage hard timeout). This PR reduces repeated embedded-cluster test work, but does not claim to resolve the full-suite timeout or the ten-minute CI target.

What this PR does / why we need it:

  • Apply test-cluster startup defaults once, before caller overrides; preserve production defaults, readiness conditions, and HAKeeper failure budgets.
  • Reuse one private cluster for EXCEPT ALL topology coverage, while retaining standalone execution of the two-CN subtest.
  • Move the session-only long-data wire cases onto the existing shared fixture and remove the now-unused isolated-fixture release helper.
  • Reduce clone rollback seed data from 5,000 rows to two explicit rows; keep forced object persistence and assert the exact post-rollback rows.
  • Replace randomized hidden-PK probes with three deterministic rows and persisted hit/miss checks that fail under an intentionally incorrect sorted-PK lookup.
  • Strengthen auto-PK dedup assertions and make snapshot/database cleanup bounded, failure-tolerant, and owned by the existing SQL cleanup path.

Validation on Go 1.26.4, Darwin arm64, native CGo, matrixone_test, single runner:

  • Full normal and race runs passed for pkg/tests/issues, pkg/tests/issues/isolated, pkg/tests/dml, and pkg/embed; issues race covered 138 top-level tests with no race report.
  • Five changed regression tests passed three same-process race repetitions each; startup/default override checks passed 100 repetitions each.
  • Standalone two-CN EXCEPT subtest and repeated long-data wire scenarios passed.
  • Paired isolated race binaries measured 261.02s to 211.36s wall and 126.45s to 115.80s CPU; peak RSS increased from 3.06GB to 3.45GB.
  • Fixture-only EXCEPT measurement fell from 42.67s to 22.54s test time and 15.88s to 8.27s CPU.
  • The issues package did not show a speedup; its final race run took 361.45s versus an earlier 344.47s run. The measured local isolated-package improvement is about 50 seconds and does not establish a ten-minute reduction in whole Linux CI runtime.
  • Independent GPT-6.1 Sol xhigh review found no blockers.

@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 →

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/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants