Skip to content

[Bug]: Conversion-warning BVT RETURNING cases depend on more than 16 GiB free disk #30480

Closed

Description

@XuPeng-SH

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 cgo artifacts and provenance-checking mo-cgo-test wrapper.
  • -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/dml

Repeat 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 << 20

With 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

  1. added
    kind/bug
    on Oct 17, 2026
  2. added
    ai-easy
    on Oct 18, 2026
  3. Ariznawlll commented on Oct 18, 2026

    @Ariznawlll
    Collaborator

    测试版本

    • 分支:官方 main
    • commit:beffc64c486d369406a41cdb1447b120bc93cb41(验收前重新核对 origin/main)
    • 部署方式:macOS arm64、Go 1.27.1,隔离 worktree 的嵌入式 1 CN / 1 TN / 1 LogService SQL 测试夹具;测试期间无外部 MO 服务。使用仅限本次测试的源码采样注入,把 automaticSpillDiskAvailable() 返回值固定为 4 GiB,未填满物理磁盘、未修改生产限额。
    • 测试日期:2026-10-18(北京时间)

    原问题验证

    1. 在上述 4 GiB 可用空间采样下,保持修复后的夹具 ProcessLimitationSpillSize = 64 << 20,执行 -race -p=2 -count=3 -short -tags matrixone_test -run '^(TestBuiltinConversionWarnings|TestStatementInfoDiagnosticCapacitySQL)$' ./pkg/tests/dml:两组测试连续 3/3 通过,原四个 RETURNING 值及诊断断言均未改动。
    2. 同一隔离源码、同一 4 GiB 采样,仅暂时去掉夹具专用 64 MiB 限额作反证;原四个 RETURNING/numeric、binary、text、malformed_literal 各自失败,实际错误均为 Error 20101 (HY000): internal error: execution resource admission rejected: requested=98 used=0 cap=1。恢复限额后通过,证明本次验证覆盖了原故障门槛。

    Happy Path 覆盖

    1. 修复后正常主机磁盘采样下,同一两组 Go SQL 测试 -race -count=3 通过。
    2. 修复后注入 4 GiB 采样下,同一两组 Go SQL 测试 -race -count=3 通过;原正常数值、二进制、文本和格式错误转换警告的 RETURNING 断言保持不变。

    Unhappy Path 覆盖

    1. 去掉夹具专用限额的受控反证准确恢复 4 个 cap=1 拒绝,而不是 SQL 数值或警告断言错误;恢复限额后,隔离工作树的受控改动已全部撤销。
    2. 未改变生产自动磁盘预留策略或专用资源拒绝测试。本轮没有真实占满/缩小物理文件系统,故物理低余量主机上的整套 BVT 尚未重新执行。

    白盒验证

    回归测试

    • 原有 TestBuiltinConversionWarnings 与 TestStatementInfoDiagnosticCapacitySQL 是本问题的持续回归入口;修复 PR #30488 已合入官方 main。此问题仅涉及 Go 嵌入式测试夹具,不新增不适用的 MOTR SQL 文件。
    • 本轮未触发共享/昂贵 CI,也未宣称完整 DML/BVT suite 在低物理磁盘主机上通过;PR 作者报告的包级运行不冒充本轮独立结果。

    测试证据

    • 修复提交和夹具变更:PR #30488;原故障与精确的四条 SQL:issue #30480。本轮受控反证的四条实际错误均为 requested=98 used=0 cap=1,修复后低空间采样 -race -count=3 输出 ok github.com/matrixorigin/matrixone/pkg/tests/dml 12.889s。

    测试结论

    测试通过。

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

Metadata

Metadata

Assignees

Labels

ai-easykind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions