跳转到内容

SQLite 损坏

触发信号:doctor 报 quick_check、Refinery history、foreign-key 或 owned schema 失败。影响面取决于 control、scheduler、KV 或 D1 文件;control 损坏视为整机故障。

只读诊断:停止 service,运行:

Terminal window
/opt/open-compute/ocd --config /var/lib/open-compute/instances/default/compute.toml doctor --json
/opt/open-compute/ocd --config /var/lib/open-compute/instances/default/compute.toml backup list --json

不得直接编辑 SQLite、WAL、SHM、migration 表。允许的 mutation 是从最近已验证整机 snapshot 做 fresh-host restore;调度表与控制数据共用 control.sqlite;scheduler recover-corrupt 拒绝替换数据库文件。

预期是损坏文件保持隔离且 authority 不被自愈改写。停止条件是没有 committed snapshot、master key 或同一 object authority;此时立即保全文件。回滚是回到恢复前的只读 evidence。验证是 doctor full、P0 smoke、每个 authoritative file 的 Refinery history 与 owned schema,以及一次重启。