You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Backport enforcement of max_execution_time to 4.2 #33378
MatrixOne v4.2.9, local single-node service and MySQL client. The main implementation is #27020, which addressed #26678. The current 4.2-dev tree has no corresponding statement timer implementation.
Actual behavior
The server accepts a positive session max_execution_time and reports it back. With the value set to 50 ms, a standalone SELECT SLEEP(0.3) returned normally after about 320 ms.
Expected behavior
A positive value times out an eligible client SELECT and returns a query-timeout error. A subsequent short query on the same connection succeeds. Zero retains its existing meaning.
Validation
Cover ordinary and prepared read-only SELECTs, SELECT timeout versus client cancellation, and reuse of the same session after timeout. This issue tracks honoring the existing session setting; administrator-enforced ceilings are a separate contract.
Activity
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time
[4.2-dev] fix(frontend): cover SELECT timeout boundaries
[4.2-dev] fix(frontend): enforce max_execution_time (#33388)
XuPeng-SH commentedon Nov 30, 2026
补充 4.2-dev 合入后的转测证据:PR #33388 的合并 SHA
95679da6cf5bc20780f510e151acea67b7fae08c与 CI 实际检出的75d83440185387df56b54c8f4799cb6fdf2f4db9源码树一致(a3baf1f42df268606e69ec876d67b8d7123007b8)。system_variable/max_execution_time.sql执行 8 条、全部通过、无跳过。覆盖普通 SELECT 的超时、短查询复用同一会话、零值禁用。TestIssue33378MaxExecutionTime和TestIssue33378MaxExecutionTimeWhileWaitingForTxnAdmission通过;普通查询、binary prepared SELECT、事务内 SQL prepared SELECT、客户端KILL QUERY、零值及会话隔离均有明确通过记录。本轮核对的是上述实跑日志,没有重跑旧版或生产环境。继续由现有 QA 负责人复核,不改派;不把这次交接当最终验收。
Ariznawlll commentedon Dec 1, 2026
测试版本
4.2-dev@d497cc15841051c49e221e28457e261e86fdb7d9。087647f1e059b3f73a5fc63ccfda7d466309e4b6a22621968e85205f117e98d1;验收开始和结束时官方 4.2-dev SHA 均为上述提交。git_version()均逐字等于上述完整 SHA。原问题验证
按 Issue 原始边界设置
session max_execution_time=50,执行SELECT SLEEP(0.3):SELECT 42成功且connection_id()不变。SELECT SLEEP(0.3)同样返回 3024 / HY000;preparedSELECT SLEEP(0)成功,随后仍复用同一连接。SELECT SLEEP(0.3)同样超时;随后SELECT 7成功且连接不变。Happy / Unhappy Path 与白盒覆盖
max_execution_time=0时SELECT SLEEP(0.1)正常返回 0;新连接仍看到会话默认值 0,确认设置 session scoped。KILL QUERY中断长查询返回非超时的 1105 /context canceled,不是 3024;随后同一连接SELECT 9成功且连接不变。TestIssue33378MaxExecutionTime与TestIssue33378MaxExecutionTimeWhileWaitingForTxnAdmission在当前精确 4.2 源码以-race -count=3执行,两个 root 合计 6/6 PASS,无 FAIL、SKIP 或 DATA RACE。早期探针中的 SET helper、session variable 字符串类型比较属于夹具错误;另一次浮点 bind 引入的是原 Issue 之外的
SLEEP(?)cast 前提,均未计作产品失败或 PASS。最终交付脚本使用原始语义的 literal0.3binary prepared 场景完整重跑,上述 6/6 均来自最终脚本。独立 MOTR 回归
按今天重新独立交付的要求,没有叠加旧 PR 353;从最新 MOTR
4.2-dev新建:391dde8c6370c08662f39d7a72be2cce66105c28结论
原 50ms 普通/prepared SELECT 超时、客户端取消区分、零值及同会话复用均已通过,回归已独立交付,关闭本 Issue。