Skip to content

[Bug]: Temporary-table cleanup emits ExpectedEOB from DROP TABLE IF EXISTS #27463

Closed

Description

@XuPeng-SH

Branch Name

main (also reproduced on PR #27368 branch agent/fix-diskcache-update-lifecycle)

Commit ID

Other Environment Information

  • Hardware: x86_64, 16 CPUs, host [email protected]
  • OS: Debian GNU/Linux 13 (trixie), Linux 6.12.43+deb13-amd64
  • Real isolated MatrixOne launch: 1 LogService + 1 TN + 1 CN, no proxy, independent data directory
  • Harness: mo-tester, test/distributed/cases/table/temporary_table

Actual Behavior

The temporary-table harness reports 191/191 SQL checks successful on both main and PR #27368, but the service log deterministically records cleanup errors on every run:

  • compile/sql_executor.go:181 internal sql executor error {"error":"ExpectedEOB","sql":"DROP TABLE IF EXISTS ... __mo_tmp_..."}
  • frontend/session.go:1132 failed to drop temp table ...: ExpectedEOB
  • frontend/session.go:2710 Failed to get database ... "error":"ExpectedEOB" while handling recently created/dropped temporary-test databases

On the main baseline run, 26 ExpectedEOB occurrences were recorded during this 191-command case, including failed internal DROP TABLE IF EXISTS cleanup. The same categories recur on the PR run. Re-running the case reproduces them; this is not a one-off.

Expected Behavior

DROP TABLE IF EXISTS used by session temporary-table cleanup should be idempotent when the database/table is already absent or not visible at the cleanup snapshot. Expected non-visibility should not be surfaced as an internal SQL executor failure or ERROR-level failed-cleanup message. Cleanup should either complete as a no-op or use a safe retry/snapshot path, without hiding a real cleanup failure.

Steps to Reproduce

  1. Start MatrixOne from either main f331bb966e or PR fix(fileservice): harden disk cache async update lifecycle #27368 head 09f82a241581e21e5b2832408f24d3b4fa455862 in an isolated single-CN/TN/LogService runtime.

  2. Point mo-tester at the CN SQL port and run:

    ./run.sh -n -g -o -p test/distributed/cases/table/temporary_table
  3. Confirm the tester summary is TOTAL: 191, SUCCESS: 191, FAILED: 0.

  4. Inspect the MatrixOne service log for ExpectedEOB, failed to drop temp table, or internal sql executor error.

  5. Repeat the case; the cleanup errors recur.

Additional information

  • This is observed on both the PR head and the main baseline, so it is not attributed as a regression introduced by PR fix(fileservice): harden disk cache async update lifecycle #27368. The PR changes fileservice disk-cache lifecycle code; it does not modify frontend/session.go or vm/engine/disttae/engine.go.
  • The SQL assertions do not fail because these messages are emitted by asynchronous/session-close cleanup paths after the tested statements complete.
  • Existing issue search found no open issue covering this temporary-table cleanup ExpectedEOB behavior. Related issue [Bug]: Cross-CN Transaction Visibility Race Causes ExpectedEOB Error #23899 concerns a different cross-CN user-visible visibility race.

Activity

  1. added
    kind/bug
    on Aug 21, 2026
  2. added
    ai-easy
    on Aug 25, 2026
  3. Ariznawlll commented on Aug 25, 2026

    @Ariznawlll
    Collaborator

    测试版本

    • 分支:main
    • commit:22b91fe986b269d24a6b8816eafdd1fa6327c8e1
    • 部署方式:本地 Go 单元测试环境
    • 测试日期:2026-08-25

    原问题验证

    复验内部 cleanup 在 DROP TABLE IF EXISTS 返回 ExpectedEOB 时按幂等成功处理,不再把该预期结束信号输出为异常错误;相关测试连续运行 3 轮。

    Happy Path 覆盖

    1. 临时表存在时,正常 DROP 路径完成。
    2. 临时表已不存在时,IF EXISTS cleanup 幂等完成。

    Unhappy Path 覆盖

    1. 注入 ExpectedEOB 后 cleanup 不升级为用户可见错误。
    2. 非 ExpectedEOB 错误仍保留为错误,不被错误吞掉。

    白盒验证

    TestInternalCompilerContextDropTableIfExistsExpectedEOBNoop 以 -count=3 验证 ExpectedEOB 特判及普通 cleanup 边界。

    回归测试

    该问题属于内部编译/日志 cleanup 分支,回归在 MatrixOne 的 pkg/sql/compile/sql_executor_context_test.go;不适合添加为 SQL MOTR。

    测试证据

    • 关联修复:MatrixOne #27510
    • 本地 focused UT:TestInternalCompilerContextDropTableIfExistsExpectedEOBNoop 重复 3 轮通过。

    测试结论

    测试通过。

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