Skip to content

[4.2] Fix flaky spill pipeline reset test - #32439

Merged
XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/ut-42-flaky-20261110
Nov 10, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/ut-42-flaky-20261110

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:

Fixes the failure in coverage job 129509179850.

Related open reports: #32327, #32258. The relevant changes from #32354 and #32404 are already on 4.2-dev; their exact historical failure causes remain unproven, so this PR does not claim to close them.

What this PR does / why we need it:

The spill ownership test submits two batches to concurrent pipeline workers after reset. Their observations can arrive in either order, so requiring the first value to be 19 flakes when the second block's value, 8211, arrives first. After Sync drains the jobs, check that both values were observed without assuming their order. Keep the existing ownership, panic, reset and memory-pool checks.

Validation

@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 10, 2026
@matrix-meow matrix-meow added the size/XS Denotes a PR that changes [1, 9] lines label Nov 10, 2026
@mergify mergify Bot added the kind/test-ci label Nov 10, 2026
@XuPeng-SH

XuPeng-SH commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: c695220a62e626c6564519f9315f54117c12a817

Review linked issue or PR description changed before publication; a fresh contextual review is queued.

@XuPeng-SH

XuPeng-SH commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Commit: c695220a62e626c6564519f9315f54117c12a817

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: c695220a62e626c6564519f9315f54117c12a817

Assessment: approve

The exact-count, unordered assertion matches the drained pipeline contract and preserves panic, ownership, reset and memory checks. No actionable findings.

Model: gpt-6.1-sol / max

Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0

Validation:

  • Reviewed the complete delta, affected worker/Sync/reset paths, discussion and linked issues.

  • Fresh static audit passed: checks/1794271712213950960-3.json and source-audit.stdout.log. Source remains unchanged.

  • Verified matching retained receipts, logs and native provenance. Author reports focused coverage/race ×100 and owning-package coverage passing.

Limitations:

  • The retained focused Go attempt timed out during dependency setup without test events; author test logs were not supplied.

  • Frozen UT/SCA checks remain in progress. Linked trackers are closed; supplied reports do not establish historical failure causes.

@XuPeng-SH
XuPeng-SH merged commit bf15b1c into matrixorigin:4.2-dev Nov 10, 2026
iamlinjunhong added a commit to iamlinjunhong/matrixone that referenced this pull request Nov 13, 2026
Carry the unordered spill reset assertion from matrixorigin#32439 and the coverage-safe RLIMIT target from matrixorigin#28467. Capture the increment service installed by the fixture process, and adapt first-replay setup to the target embed API with TCP-only SQL transport. Production backports remain unchanged.
XuPeng-SH added a commit that referenced this pull request Nov 13, 2026
## What type of PR is this?

- [ ] API-change
- [x] BUG
- [x] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Related to #32146.

## What this PR does / why we need it:

Backport the large-variable-length write memory fixes and their
lifecycle dependencies to `v4.2.8-hotfix`. A 196,092-row fixture with
very large JSON/text values completes its batched UPDATE on 4.2.8 but
OOM-kills a 20-GiB CN during the subsequent VARCHAR-to-INT COPY ALTER.
The backports bound CN spill runs and pooled writer retention while
preserving buffer/object ownership through completion, cancellation, and
failure.

Cherry-picked with source provenance, in order: #32081, #32155, #32332,
#32164, #32398, #32454, and #32065. The target branch's existing #32704
is retained. There are no manual production-code changes to the seven
backports.

Validation on head `cc1d6c51a156e232182030b093bbf9bfc1ae95c1`:

- Fresh native build succeeds with actual-head version/commit metadata.
Formatting and `git diff --check` pass. All seven commits have identical
added/removed lines and paths to their source commits; only #32155 has
documentation-only unchanged-context differences.
- Actual-head full-data run PASS: 196,092 rows, 147,941 converted rows;
PK/row count, payload byte lengths and CRC sums, final statuses, and INT
type verified. All roles report `OOMKilled=false`.
- CN limit and total memory+swap are both 20 GiB, 6 CPUs, GOMEMLIMIT 1
GiB, cache 2 GiB. Sampled CN RSS peak: **12.4115 GiB** (2-second
sampling). Sampled cgroup usage peak: 19.7955 GiB; kernel cgroup
high-water reached 20 GiB, with zero failcnt/OOM. RSS is not total
container memory, so this does not imply 7.6 GiB of container headroom.
- Driver start through final verification: **431.90 s (7m12s)**,
including token UPDATE **221.59 s**, token COPY ALTER **200.84 s**, and
remaining validation/setup. Service startup and cold-backup restore are
excluded.
- Native-toolchain scoped regressions pass: nine owning packages (2,302
tests/subtests); compile import/cancellation selector (153); focused
race checks across mpool, rscthrottler, objectio and ioutil (93). Runs
use `-count=1`, the repository CGo test wrapper, and default vet checks.
No failures; task services are stopped. Full-repository CI/review is not
part of this local validation, and further GitHub results are not
awaited.

The workload measures the MOI offset212 token-table migration, with
placeholder companion tables, rather than all MOI deployment phases.
Logical restore uses a shared DISK backend and changes the original
physical object layout; customer data and raw logs are not included in
this PR. Single-run timings are not a statistical performance benchmark.


Revision `b6b9f3ba40d7bb9e598b2a8846b7ed166b4a48b7` (test-only
follow-up):

- Carries #32439's unordered two-observation reset assertion and
#28467's 512-MiB RLIMIT target; closes the actual fixture-owned
increment service; adapts first-replay setup to this release's embed API
and TCP SQL transport. Production changes in the seven backports remain
identical to their sources.
- New local validation (Darwin/arm64, Go 1.27.1, CGo wrapper,
`-count=1`): owning production packages build; all four changed test
packages vet; `objectio/ioutil` full coverage and race pass; `mpool`
coverage passes; `sql/compile` full normal and race pass with
`TMPDIR=/private/tmp`; first-replay
startup/disconnect/reconnect/prepared SQL passes normal and race.
Spill-reset and fixture-ownership tests each pass `-race -count=100`.
Formatting, diff whitespace, and delivery artifact checks pass.
- Run 43449877707 attempt 1 failed SCA job 131969091882 (`make
static-check-analysis`) on missing `embed.WithDataPath`; coverage job
131969165708 reports that build error, RLIMIT runtime allocation
failure, and the fixture closure assertion. These backported test
defects are addressed here; the old run is not rerun because the push
triggers fresh CI. Pinned molint rebuilt for the local Go version exits
zero but emits inherited analyzer diagnostics; this is not a
zero-diagnostic SCA claim.
- Local Parquet fanout failures also reproduce in an unmodified archive
of target base `b572b5cd95a25d404cd0f0df32629b39c6fff120`; full PR
compile normal/race pass with a short temporary root. No Parquet
code/test is changed. Linux-only RLIMIT execution is reused from
#28467's upstream coverage/race evidence; not executed on this Darwin
host. Original migration and other upstream validation above retain
their stated revisions/configurations; the customer-data migration was
not repeated for these test changes. New CI is not awaited. Raw local
logs remain outside the source tree.

---------

Co-authored-by: aptend <[email protected]>
Co-authored-by: XuPeng-SH <[email protected]>
Co-authored-by: GreatRiver <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: 和光同尘 <[email protected]>
Co-authored-by: jiangxinmeng1 <[email protected]>
aptend pushed a commit to aptend/matrixone that referenced this pull request Nov 22, 2026
## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes the failure in [coverage job
129509179850](https://github.com/matrixorigin/matrixone/actions/runs/42719261201/job/129509179850?pr=32256).

Related open reports: matrixorigin#32327, matrixorigin#32258. The relevant changes from matrixorigin#32354
and matrixorigin#32404 are already on 4.2-dev; their exact historical failure causes
remain unproven, so this PR does not claim to close them.

## What this PR does / why we need it:

The spill ownership test submits two batches to concurrent pipeline
workers after reset. Their observations can arrive in either order, so
requiring the first value to be 19 flakes when the second block's value,
8211, arrives first. After `Sync` drains the jobs, check that both
values were observed without assuming their order. Keep the existing
ownership, panic, reset and memory-pool checks.

### Validation

- Go 1.26.4, Linux/amd64, CGo, `matrixone_test`: focused test passed 100
runs in coverage mode and 100 runs under `-race`; owning package passed
in coverage mode.
- Incremental formatting, `go vet`, and repository-configured
golangci-lint for `pkg/objectio/ioutil` passed.
- Current 4.2-dev: matrixorigin#32327's named cross-CN prepared-query scenario
passed under `-race`; matrixorigin#32258's original
`TestSQLFileAccessTenantStageCDC` passed once in package coverage mode,
and the existing cache/FULLTEXT2 lifecycle regression tests passed under
`-race`. These focused passes do not reproduce the full original CI
workload or prove the historical root causes.
- Test-only assertion change; no production performance impact.

(cherry picked from commit bf15b1c)

This branch was previously deployed

1 inactive deployment
ci — c695220a Deployed Nov 10, 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 kind/test-ci 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