Skip to content

[Bug]: mo-dump -db all fails on built-in catalog relations in clean tenants #30601

Closed as not planned

Description

@Ariznawlll

问题

mo-dump README 将 -db all 列为导出全部数据库的正式用法。但在干净的普通租户里,该命令把内置 mo_catalog 也送入普通表导出路径,遇到非普通关系类型后退出 1;因此用户自己的数据库不能通过 -db all 得到完整备份。输出文件可能已经含用户库的 DDL/数据前缀,但没有 MODUMP SUCCESS,不可用于恢复。

固定版本与复现

  • MatrixOne main:75ff736835c3d00d40dc00a0a1d3b11129388e5b
  • mo_dump main:324c33dbdc7075cd5d7beaafd1e15c76709dd442
  • 隔离 LOG/TN/CN,frontend 26011;三个独立新建普通租户 A/B/C,均只额外创建同名的用户库 exp_modump_all_case,其中 t(id INT PRIMARY KEY, v VARCHAR(20)) 只有 (1,'control')。

每个租户分别执行(连接参数省略):

mo-dump -db exp_modump_all_case > control.sql
mo-dump -db all > all.sql

三个租户中,指定用户库的对照均退出 0、有 MODUMP SUCCESS、包含该行;-db all 均退出 1、没有成功标记,错误完全相同:

modump error: not supported: table: mo_increment_columns table type:

此前在已有数据的另一个普通租户运行 -db all,同样退出 1,不过首先遇到的是 mo_view_dependencies table type: cluster。三个新租户的 SHOW DATABASES 都包含 exp_modump_all_case 和内置的 information_schema、mo_catalog、mysql、system、system_metrics。报错后每个源表仍为一行 (1,'control'),后续 SELECT 1 成功。失败脚本未恢复,以免误用不完整备份。

白盒定位与期望

cmd/mo-dump/main.go:-db all 使用 getDatabases() 的 SHOW DATABASES 结果(约 181、494 行),没有对内置数据库做适配/排除;dumpData() 把列出的关系交给只识别普通表、外表、视图的分支(约 242–313 行),遇到 catalog 的其他 relkind 立即返回错误。

应明确 all 的产品范围,并在该范围内完整导出可恢复的用户数据库,不能因每个租户固有的系统库而必然失败。若系统库有特定导出模式,也应单独处理,不应让文档中的 -db all 对干净租户不可用。

已搜索 matrixone/mo_dump 仓库 open/closed issue、PR 和 mysql-compatibility-contract,未找到本故障的重复条目。历史 #10094 讨论过 all 功能及内置库范围,但不是这个运行时错误的追踪单;sequence 导出失败 #30577 也与这里没有 sequence 的全新租户不同。

Activity

  1. added this to the MO-202610 milestone on Oct 19, 2026
  2. added
    kind/bug
    on Oct 19, 2026
  3. added theissue type on Oct 19, 2026
  4. XuPeng-SH commented on Oct 22, 2026

    @XuPeng-SH
    Contributor

    This report is now tracked together with #30577. The canonical issue retains explicit acceptance cases for the behavior described here. This is an administrative duplicate/consolidation closure only; the underlying defect is not claimed fixed. The original description and discussion remain available on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions