Skip to content

[4.2-dev] fix(mpool): stabilize physical realloc failure test - #33031

Merged
XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/4.2-mpool-flaky
Nov 20, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/4.2-mpool-flaky

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:

Refs #32744

What this PR does / why we need it:

The Linux physical-reallocation failure test can abort the Go runtime under its process-local address-space limit. The 1 GiB target crosses the mpool high-watermark logging threshold before the allocator runs, and logging or GC can exhaust the 64 MiB headroom.

Backport the 512 MiB target from #28467 and use the 256 MiB headroom already used on main. The target remains larger than the available address space and the existing assertions still require a physical allocator rejection and verify ownership, accounting, profiling and contents for both source sizes and allocation paths.

If the allocator unexpectedly succeeds, retain the returned allocation for cleanup so the original assertion remains visible.

Validation:

  • Linux/arm64, Go 1.26.4: focused test passed 20 times with coverage and 5 times with coverage across MatrixOne packages.
  • Full mpool package passed with coverage and with the race detector. Incremental go vet, gofmt, and git diff --check passed.
  • An emulated amd64 container did not enforce the guest mapping limit, so native Linux/x86 CI is needed to validate the target runner. The emulator run did verify the unexpected-success cleanup path.
  • The larger process address-space headroom reduces runtime allocation pressure and remains finite.

…n#28467)

## What type of PR is this?

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

## Which issue(s) this PR fixes:

issue matrixorigin#28451

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

fix(mpool): avoid coverage crash in realloc failure test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@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/S Denotes a PR that changes [10,99] lines label Nov 20, 2026
@mergify mergify Bot added the kind/test-ci label Nov 20, 2026
@mergify

mergify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@XuPeng-SH
XuPeng-SH merged commit e566499 into matrixorigin:4.2-dev Nov 20, 2026
@XuPeng-SH
XuPeng-SH deleted the codex/4.2-mpool-flaky branch November 20, 2026 23:59

This branch was successfully deployed

No deployments
ci — 3f45e335 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 kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants