Repository navigation
Description
Is there an existing issue for the same bug?
- I searched open/closed issues for the exact test name, RETURNING + cap=1, and fixture/disk terms, and searched PRs for the test name.
Related #30450 concerns Group/Window unit fixtures. Closed #29832 concerns frontend spool unit fixtures, fixed by private budgets in #29862. This report is the new DML SQL BVT RETURNING closure added by #30312; those fixes do not cover its default shared embedded CN configuration. #27627 is a different resource-error mapping report.
Branch Name
main
Commit ID
ba6b31941074cdaaf906ba2ec3883bc3b3eab85f
Other Environment Information
- Linux amd64, Go 1.27.1, repository
make cgoartifacts and provenance-checkingmo-cgo-testwrapper. -short -tags matrixone_test -p 2 -count=1, tested both normal and race modes.- LOCAL/test storage is on a 32 GiB filesystem with roughly 2–5 GiB available during this audit; a final paired-control sample was 4,604,833,792 bytes free. No deliberate disk filling was used.
- Tracked checkout remains clean; the diagnostic configuration change below uses a Go overlay only.
Actual Behavior
The four new TestBuiltinConversionWarnings/columns_and_statement_constants/returning cases fail before their intended value/diagnostic assertions:
- numeric:
update inputs set n='7' where id=1 returning bit_count(id) - binary:
... returning bit_count(cast(n as binary)) - text:
... returning bit_count(n) - malformed_literal:
... returning bit_count('3x')
All report:
Error 20101 (HY000): internal error: execution resource admission rejected:
requested=98 used=0 cap=1
Two independent executions (normal and race) each produced four failing RETURNING subcases: 60 passing / 7 failing test-and-subtest events per run, including failed ancestors. TestStatementInfoDiagnosticCapacitySQL passes. The numeric/no-warning control fails too, so the error is not evidence that malformed-integer conversion itself is still broken.
The new RETURNING block is added by #30312. The shared SQL fixture leaves ProcessLimitationSpillSize automatic, inheriting the host-dependent emergency disk cap. automaticSpillDiskCap intentionally retains at least 16 GiB headroom and returns 1 below that threshold. The fresh SQL session copies that policy into its process; RETURNING cannot stage even its first 98-byte record.
Expected Behavior
The bounded success-path SQL fixture should reach all original value, mutation and warning assertions under an explicitly owned finite spill budget. It should not silently require over 16 GiB of free disk for a tiny RETURNING result. Preserve production emergency headroom and separate admission-rejection coverage; retain every existing assertion.
Steps to Reproduce
On a filesystem with at most 16 GiB available, build native prerequisites and run:
.agents/skills/mo-dev/scripts/mo-cgo-test \
-p 2 -count=1 -short -tags matrixone_test -timeout=10m -json \
-run '^(TestBuiltinConversionWarnings|TestStatementInfoDiagnosticCapacitySQL)$' \
./pkg/tests/dmlRepeat with -race; both were executed and show the same four failures.
Controlled diagnostic on the same revision/filesystem: change only the CN setup in adjustBasicClusterService, via a test-run-local overlay on pkg/embed/testing.go:
config.CN.Frontend.ProcessLimitationSpillSize = 64 << 20With all SQL and assertions unchanged, both exact roots pass in normal mode (67 passing events, 0 failures) and race mode (67 passing events, 0 failures), including all four RETURNING value/warning checks. This is a discriminating fixture control, not a request to raise a global production limit or to apply this limit indiscriminately to negative tests.
Additional information
The original #30218 SQL was independently verified through real MySQL-protocol connections: all 17 reported built-ins preserve their results and emit the expected 1292 warnings; valid/binary inputs, inactive branches and empty results have no spurious warnings. Explicit-cast warning regressions #30265/#30271 also pass. The new finding is a test resource-ownership gap, not a new production conversion-result bug or a demonstrated regression of the emergency disk policy.
Please give the affected success fixture an explicit bounded budget at an appropriate fixture-local scope, preserve existing negative/admission tests, and verify on a small-free-space filesystem. Related PR: #30312.
Activity
test: set a finite spill budget for shared SQL fixtures (#30488)
Ariznawlll commentedon Oct 18, 2026
测试版本
mainbeffc64c486d369406a41cdb1447b120bc93cb41(验收前重新核对origin/main)automaticSpillDiskAvailable()返回值固定为 4 GiB,未填满物理磁盘、未修改生产限额。原问题验证
ProcessLimitationSpillSize = 64 << 20,执行-race -p=2 -count=3 -short -tags matrixone_test -run '^(TestBuiltinConversionWarnings|TestStatementInfoDiagnosticCapacitySQL)$' ./pkg/tests/dml:两组测试连续 3/3 通过,原四个RETURNING值及诊断断言均未改动。RETURNING/numeric、binary、text、malformed_literal各自失败,实际错误均为Error 20101 (HY000): internal error: execution resource admission rejected: requested=98 used=0 cap=1。恢复限额后通过,证明本次验证覆盖了原故障门槛。Happy Path 覆盖
-race -count=3通过。-race -count=3通过;原正常数值、二进制、文本和格式错误转换警告的RETURNING断言保持不变。Unhappy Path 覆盖
cap=1拒绝,而不是 SQL 数值或警告断言错误;恢复限额后,隔离工作树的受控改动已全部撤销。白盒验证
pkg/embed/testing.go为共享 SQL 测试夹具设置 64 MiB 限额;pkg/vm/process/execution_resource_budget.go的生产自动门槛未改。本轮另运行相关资源预算 Go 测试-race -count=3。回归测试
TestBuiltinConversionWarnings与TestStatementInfoDiagnosticCapacitySQL是本问题的持续回归入口;修复 PR #30488 已合入官方 main。此问题仅涉及 Go 嵌入式测试夹具,不新增不适用的 MOTR SQL 文件。测试证据
requested=98 used=0 cap=1,修复后低空间采样-race -count=3输出ok github.com/matrixorigin/matrixone/pkg/tests/dml 12.889s。测试结论
测试通过。