Skip to content

test: cut repeated work in slow race UT cases - #33596

Merged
XuPeng-SH merged 1 commit into
matrixorigin:mainfrom
XuPeng-SH:perf/race-ut-case-cost
Dec 1, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:mainfrom
XuPeng-SH:perf/race-ut-case-cost

Conversation

@XuPeng-SH

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Test and CI

Which issue(s) this PR fixes:

Related to #32745 (race UT and flaky-test tracker). Follows #33584.

What this PR does / why we need it:

Reduce repeated fixture work, data volume, I/O, and fixed waits across nine race UT cases.

  • Share two snapshot/restore rounds between publications of the same data shape. Keep independent no-publication controls and check every publication and subscription after each restore, including access denial after an excluded name is reused.
  • Reclaim the obsolete branch-copy and dropped truncate-probe files together. Keep the real flush, L0 merge, physical reclamation, restart, and exact post-restart rows.
  • Reduce the multi-CN Top and bulk-write fixtures while still exercising remote Merge Top, the auto-increment cache boundary, workspace object writes, and ADD/DROP PRIMARY KEY copy.
  • Batch LIKE test inserts with bound binary values and reuse exact scan results across temporal index checks. Keep the NULL and malformed-byte cases, plan checks, clock transitions, and text/binary prepared execution.
  • Run three independent managed-LSN blackholes concurrently. Join the real GC timeout and recovery drains, and use one observation window for the parked Close test. Release and join workers on assertion failure.

Validation

  • Local Go race tests passed for 18 selected test roots across embed, DML, issues, SQL integration, logservice, and disttae. The four disttae roots ran three times.
  • Repository incremental SCA for the six affected packages, gofmt, and git diff --check passed.

@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 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Dec 1, 2026
@XuPeng-SH

XuPeng-SH commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 7b8b2f16e3a8a596fc2f0c638c29fb72da666b40

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 7b8b2f16e3a8a596fc2f0c638c29fb72da666b40

Assessment: approve

The prior validation gap is closed, and no actionable defects remain. The test-only changes reuse existing fixtures and preserve the reviewed result, restore, cleanup, and recovery assertions without adding production mechanisms.

Model: gpt-6.1-terra / max

Session: 01a2311a-8b63-75f2-9f3e-d3031b7fba4f · slot 2 · generation 15

Validation:

  • The private-runtime preflight passed. Native libraries were built in the diagnostic directory from inputs verified against the frozen source.

  • All nine changed test roots and the other caller of the shared GC helper passed focused Go race tests. Separate same-process race repetitions passed for managed LSN operations (3), drain budget (100), and parked shutdown (14).

  • Go vet and the repository-pinned incremental molint and golangci-lint checks passed for all six affected packages. Gofmt and git diff --check passed.

  • A baseline control using verified original test-file overlays passed. In one comparable local run, managed LSN elapsed time fell from 24.52s to 8.25s, drain budget from 6.06s to 0.14s, and parked shutdown from 4.58s to 2.03s.

  • Matched the claimed checks to retained logs and command, source, and exit receipts; the audit and discussion assessment are in the diagnostic directory.

Limitations:

  • The frozen CI snapshot showed UT and SCA still in progress; the local checks do not establish their eventual results.

  • The multi-CN Top fixture produced one data object in both baseline and candidate runs. Its existing plan assertions do not independently prove that both workers consume rows; this limitation predates the PR.

  • The single-run baseline comparison is not a full CI timing measurement. Snapshot and SQL test timings were inconclusive in that comparison.

@XuPeng-SH
XuPeng-SH merged commit cb2309d into matrixorigin:main Dec 1, 2026
21 of 22 checks passed
@XuPeng-SH
XuPeng-SH deleted the perf/race-ut-case-cost branch December 1, 2026 12:21

This branch was successfully deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants