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]: Python SDK snapshot context silently reads live data for qualified tables and JOINs #31206
另用 database snapshot:快照时 a=(1)、b=(1,10),更新当前表 b.v=20 后,直接在两个表上明确加 {snapshot=...} 的 JOIN 返回 10,而 with c.snapshot(name) 执行 SELECT b.v FROM a JOIN b ON a.id=b.id 返回 20,将快照左表与当前右表混读。
Local SDK QA (2026-10-26): SDK source 28e8760905a7f39dba2ce436357ea75492f30512; isolated MatrixOne service binary 83c1e23526fc0ed31188abd7fc2ca87cd3a6d4b3 (SHA-256 6bebe05311ae6438967a824641e3849fbbc9af298003177351794601edf14b4b). tests/online/test_sdk_quality_contracts.py::test_snapshot_same_time_all_tables passed. It created a database snapshot, changed a joined table afterward, and verified that direct snapshot SQL, sync Client.snapshot(), async AsyncClient.snapshot(), an aliased query, and a database-qualified table read all returned the historical row (1), while a live read returned the changed value (2). This directly covers qualified-table and joined-table snapshot routing. Scope: focused SDK live contract against the older service binary; it is not full-suite or new-kernel qualification.
核对已合入回归的 SDK 公开入口、SQL/返回值断言和修复后实际服务结果;未修改产品源码,未运行全量 SDK suite 或 race。
回归测试
#31262 已包含 clients/python/tests/online/test_sdk_quality_contracts.py::test_snapshot_same_time_all_tables。Python SDK API 行为无法由纯 SQL MOTR 代替,未新增 MO 或 MOTR PR。#31262 六个离线 SDK CI job 成功;在线 CI SKIPPED,在线结果采用本地实测。
Activity
fix(python-sdk): unify query contracts and atomic manager operations (#…
XuPeng-SH commentedon Oct 26, 2026
Local SDK QA (2026-10-26): SDK source
28e8760905a7f39dba2ce436357ea75492f30512; isolated MatrixOne service binary83c1e23526fc0ed31188abd7fc2ca87cd3a6d4b3(SHA-2566bebe05311ae6438967a824641e3849fbbc9af298003177351794601edf14b4b).tests/online/test_sdk_quality_contracts.py::test_snapshot_same_time_all_tablespassed. It created a database snapshot, changed a joined table afterward, and verified that direct snapshot SQL, syncClient.snapshot(), asyncAsyncClient.snapshot(), an aliased query, and a database-qualified table read all returned the historical row(1), while a live read returned the changed value(2). This directly covers qualified-table and joined-table snapshot routing. Scope: focused SDK live contract against the older service binary; it is not full-suite or new-kernel qualification.Ariznawlll commentedon Oct 27, 2026
测试版本
420786e21566e5b9d5875e7d6a7f3102fd0761af;修复 PR fix(python-sdk): unify query contracts and atomic manager operations #31262 已 MERGED,merge commit28e8760905a7f39dba2ce436357ea75492f30512已核实在该 main 祖先链。8bd0f1f4c60cd0590c68cdbb2cbca31fc9d39d071ec367ab56d5c49b4eec327e。原问题验证
创建数据库快照后把 JOIN 右表的
ref从 1 改成 2。原生双表 snapshot SQL、同步Client.snapshot()、异步AsyncClient.snapshot()、别名 ORM 查询和database.table限定读均返回历史行(1,);实时读返回新值(2,)。原来限定名/JOIN 偷读 live 的故障在 3 轮均未出现。Happy Path 覆盖
Unhappy Path 覆盖
白盒验证
核对已合入回归的 SDK 公开入口、SQL/返回值断言和修复后实际服务结果;未修改产品源码,未运行全量 SDK suite 或 race。
回归测试
#31262 已包含
clients/python/tests/online/test_sdk_quality_contracts.py::test_snapshot_same_time_all_tables。Python SDK API 行为无法由纯 SQL MOTR 代替,未新增 MO 或 MOTR PR。#31262 六个离线 SDK CI job 成功;在线 CI SKIPPED,在线结果采用本地实测。测试证据
本地 JUnit:
/private/tmp/mo-six-qa-20261026/qa-night/sdk-contract-round-{1,2,3}.xml(每轮 tests=70、失败/错误/跳过均 0)及sdk-offline-round-{1,2,3}.xml(每轮 112、失败/错误/跳过均 0)。修复 PR:#31262 。测试结论
测试通过。