快照存储与 LSN
大多数用户应该使用 repository commits:
HEADHEAD~1mainfeature/search内部诊断有时会暴露 storage coordinates:
VolumeIdLogIdLSNstorage commit hashRepository Commit Id
Section titled “Repository Commit Id”repository commit id 标识一个 app-state commit,可以包含多个路径:SQLite snapshot、text file、binary file 和 external payload pointer。
graft diff --rows HEAD~1 HEAD data.sqliteStorage LSN
Section titled “Storage LSN”LSN 是 storage log 内的 logical sequence number:
(LogId, LSN) -> storage commitLSN 本身不是全局唯一,也不是 hash。它必须和 LogId 一起解释。
debug pragma:
PRAGMA graft_debug_log_lsn;Storage Commit Hash
Section titled “Storage Commit Hash”每个 storage commit 都有 content hash。snapshot object 记录 expected hash, 用于验证 LSN coordinate 指向预期 page history。
log X from LSN 1 to LSN 4 LSN 1 -> hash A LSN 2 -> hash B实际规则:应用历史使用 repository commits;只有调试 storage 层时才使用 LSN。