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]: SHOW MONGODB CONNECTIONS triggers frontend privilege panic #27257
Activity
Ariznawlll commentedon Aug 18, 2026
测试版本
mainccb37f591b07e9901da2e0e7b5cb1733485e8771原问题验证
在合法 MongoDB connection 和 external table 已创建、外表查询正常的管理员会话中执行:
实际结果仍为:
本次 TKE 环境复现 1/1;此前 issue 中单机环境已记录 3/3。失败后同一 MySQL 会话执行
SELECT 1正常,MatrixOne 组件未退出。补充测试证据(TKE 3 CN 环境)
mo-search-commit-ccb37f591-20260818(129 TKE 环境)ccr.ccs.tencentyun.com/matrixone-dev/matrixone:commit-ccb37f591Happy Path 覆盖
ALTER MONGODB CONNECTION ... ENABLE后查询恢复正常。Unhappy Path 覆盖
SHOW MONGODB CONNECTIONS在 privilege dispatch 阶段触发 internal panic。ALTER MONGODB CONNECTION ... DISABLE后外表查询按预期拒绝。SELECT 1正常,未观察到 CN 退出或数据污染。ALTER MONGODB CONNECTION ... ENABLE后外表查询恢复,返回 3 行、聚合值 60。白盒验证
不适用:本次补充为黑盒分布式 E2E;已有 issue 记录
authenticate.go默认 privilege 分支和缺少ShowMongoDBConnections分支。回归测试
已有 issue #27257 建议补充 frontend privilege unit test 和
test/mongodbE2E SQL case;本次未修改仓库测试代码。测试证据
mo-search-commit-ccb37f591-20260818internal error: panic does not have the privilege definition of statement type *tree.ShowMongoDBConnections3/60,MongoDB primary 切换和 CN 重启后均恢复。测试结论
测试不通过。
iamlinjunhong commentedon Aug 20, 2026
评论验证的是旧 main commit ccb37f5,当时确实还没有修复;该评论发布后,修复 PR #27276 已于 8 月 18 日合入。
时间线:
Ariznawlll commentedon Aug 20, 2026
测试版本
maind7899e703dfaef428f272c2fc0452813c0b8636crs0,SCRAM-SHA-256,majority原问题验证
在已创建 MongoDB connection 的管理员会话中连续执行:
3/3 轮均正常返回连接元数据,未触发
*tree.ShowMongoDBConnectionsprivilege panic,后续SELECT 1均返回1。Happy Path 覆盖
SHOW MONGODB CONNECTIONS成功。Unhappy Path 覆盖
白盒验证
不适用:本轮以管理员黑盒权限路径为验收依据。
回归测试
已加入 MOTR:
14_issue_regression.issue_27257_show_mongodb_connections,执行--repeat 3,3/3 通过;case 只断言命令不 panic 和会话可用,不固化动态连接列表。测试证据
MOTR 输出:
total=3 success=3 failed=0;每轮stmts=4 ok=4 fail=0。测试结论
测试通过。