Skip to content

test: reduce CPU UT lifecycle wait overhead - #28936

Merged
XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
Lundomn:codex/ci-ut-cpu-optimization-v2
Sep 16, 2026
Merged

XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
Lundomn:codex/ci-ut-cpu-optimization-v2

Conversation

@Lundomn

@Lundomn Lundomn commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The PR UT job spends substantial time in fixed lifecycle waits, retry delays, serial plan-race shards, and sequential independent DataBranchDiff scenarios. This change removes waits only when the target state is already observable, and bounds independent work to preserve runner stability.

  • Replace test-only sleeps with event/barrier, synchronous-state, virtual-time, or deterministic expiry checks.
  • Run plan race shards with transactional per-shard report recovery; keep the default serial on the constrained CI runner while allowing an explicit maximum parallelism of 2.
  • Run all 20 DataBranchDiff scenarios with isolated one-connection handles and a maximum of 2 concurrent scenarios.
  • Preserve every case, subtest, SQL statement, result/oracle, error path, boundary, fault injection, topology, and cleanup path.

This PR is CPU/non-GPU only. It does not modify GPU vector files or move cases to regression.

Validation

  • go test ./optools -count=1 -timeout=300s passed.
  • Focused CGo tests passed for the changed CPU paths, including all 20 DataBranchDiff scenarios, cache/taskservice/cron lifecycle tests, and the existing changed-package coverage.
  • -race passed for cache and taskservice/cron lifecycle tests; repeated runs passed (taskservice -count=10, cache -count=5).
  • Report recovery was verified with 12 numeric shards; bash -n, gofmt, and git diff --check passed.
  • The latest full CI run passed, including Ubuntu UT, arm64 SCA, coverage, shared/native builds, BVT, and Connector/J; CUDA/vector SQL/result files remain out of scope.

Closes #28933

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

@matrix-meow matrix-meow added the size/L Denotes a PR that changes [500,999] lines label Sep 15, 2026
@matrix-meow matrix-meow added size/XL Denotes a PR that changes [1000, 1999] lines and removed size/L Denotes a PR that changes [500,999] lines labels Sep 15, 2026
@Lundomn
Lundomn force-pushed the codex/ci-ut-cpu-optimization-v2 branch from 9c501d5 to d3b8177 Compare September 15, 2026 13:03
@XuPeng-SH
XuPeng-SH merged commit 8cedfde into matrixorigin:main Sep 16, 2026
39 of 40 checks passed
@mergify mergify Bot added dequeued and removed queued labels Sep 16, 2026
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What this PR does / why we need it:

The PR UT job spends substantial time in fixed lifecycle waits, retry
delays, serial plan-race shards, and sequential independent
DataBranchDiff scenarios. This change removes waits only when the target
state is already observable, and bounds independent work to preserve
runner stability.

- Replace test-only sleeps with event/barrier, synchronous-state,
virtual-time, or deterministic expiry checks.
- Run plan race shards with transactional per-shard report recovery;
keep the default serial on the constrained CI runner while allowing an
explicit maximum parallelism of 2.
- Run all 20 DataBranchDiff scenarios with isolated one-connection
handles and a maximum of 2 concurrent scenarios.
- Preserve every case, subtest, SQL statement, result/oracle, error
path, boundary, fault injection, topology, and cleanup path.

This PR is CPU/non-GPU only. It does not modify GPU vector files or move
cases to regression.

## Validation

- `go test ./optools -count=1 -timeout=300s` passed.
- Focused CGo tests passed for the changed CPU paths, including all 20
DataBranchDiff scenarios, cache/taskservice/cron lifecycle tests, and
the existing changed-package coverage.
- `-race` passed for cache and taskservice/cron lifecycle tests;
repeated runs passed (`taskservice -count=10`, `cache -count=5`).
- Report recovery was verified with 12 numeric shards; `bash -n`,
`gofmt`, and `git diff --check` passed.
- The latest full CI run passed, including Ubuntu UT, arm64 SCA,
coverage, shared/native builds, BVT, and Connector/J; CUDA/vector
SQL/result files remain out of scope.

Closes matrixorigin#28933

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What this PR does / why we need it:

The PR UT job spends substantial time in fixed lifecycle waits, retry
delays, serial plan-race shards, and sequential independent
DataBranchDiff scenarios. This change removes waits only when the target
state is already observable, and bounds independent work to preserve
runner stability.

- Replace test-only sleeps with event/barrier, synchronous-state,
virtual-time, or deterministic expiry checks.
- Run plan race shards with transactional per-shard report recovery;
keep the default serial on the constrained CI runner while allowing an
explicit maximum parallelism of 2.
- Run all 20 DataBranchDiff scenarios with isolated one-connection
handles and a maximum of 2 concurrent scenarios.
- Preserve every case, subtest, SQL statement, result/oracle, error
path, boundary, fault injection, topology, and cleanup path.

This PR is CPU/non-GPU only. It does not modify GPU vector files or move
cases to regression.

## Validation

- `go test ./optools -count=1 -timeout=300s` passed.
- Focused CGo tests passed for the changed CPU paths, including all 20
DataBranchDiff scenarios, cache/taskservice/cron lifecycle tests, and
the existing changed-package coverage.
- `-race` passed for cache and taskservice/cron lifecycle tests;
repeated runs passed (`taskservice -count=10`, `cache -count=5`).
- Report recovery was verified with 12 numeric shards; `bash -n`,
`gofmt`, and `git diff --check` passed.
- The latest full CI run passed, including Ubuntu UT, arm64 SCA,
coverage, shared/native builds, BVT, and Connector/J; CUDA/vector
SQL/result files remain out of scope.

Closes matrixorigin#28933

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

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

size/XL Denotes a PR that changes [1000, 1999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Reduce CPU and non-GPU UT lifecycle wait overhead

7 participants