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
AsyncPitrManager leaks MatrixOne's SHOW PITR wildcard marker (*) through the public Pitr model for non-applicable account, database, and table scopes. The synchronous manager already normalizes the same values to None, and the model declares these fields as Optional[str].
Activity
Ariznawlll commentedon Oct 24, 2026
测试版本
main6fb6531432aaec8c1fbd98a30364941559e0e1d6564d02384605c245586a61bf76db58b3d9106976,已确认是上述官方 main 的祖先。SHOW PITR结果行的映射,使用公共AsyncPitrManager.get/list与模拟返回行,不将其描述为真实 PITR 恢复测试。原问题验证
将 cluster PITR 返回行的 account/database/table 三个
*标记交给公共异步get()和list();三轮均得到(None, None, None),没有泄漏*。同一批次还检查 account、database、table 四级:预期适用字段保留原值、不适用字段转None;get与list全部一致,3/3 轮通过。Happy Path 覆盖
*/*/* → None/None/None;account:acc/*/* → acc/None/None。acc/db/* → acc/db/None;table:acc/db/tab → acc/db/tab。以上公共异步get/list路径每轮均逐字段断言。tests/offline/test_pitr.py与tests/offline/test_cdc_sql.py合计 74 项,重复运行 3 轮均通过;其中 PITR 文件包含原异步get()的三个None断言。Unhappy Path 覆盖
get('missing')收到空行时仍抛PitrError,3/3;错误输入未被伪装成带空 scope 的有效 PITR。白盒验证
核对修复只在异步
_row_to_pitr对三个 scope 字段执行与同步路径相同的* → None映射。该问题是 Python SDK 行映射,不涉及 Go 内部并发/fault;未运行 Go race。回归测试
PR #30944 已包含
clients/python/tests/offline/test_pitr.py中的公共异步get()回归。PR 的 Python SDK offline CI 在 Python 3.10、3.11、3.12 与所列 SQLAlchemy 组合均成功,例如 Python 3.10 / SQLAlchemy 2.0。online CI 为 SKIPPED,未声称运行完整在线矩阵。此缺陷只能由 SDK 模型映射断言验证,MOTR SQL 无法观察 PythonNone,不另加重复 MOTR case。测试证据
隔离工作树命令:
PYTHONPATH=. /private/tmp/mo-sdk-qa-1HFPSJ/venv/bin/python -m pytest -q -o addopts='' tests/offline/test_pitr.py tests/offline/test_cdc_sql.py,结果74 passed in 0.37s;同组测试先前重复 3 轮输出全部 74 个通过标记。公共get/list四级 scope 加缺失名称断言输出PASS public async get/list 4 scopes and missing PITR,连续 3 轮。测试结论
测试通过。