[Important] CURRENT 文件权威性与实际恢复模型不一致 #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
来源
Oracle 审核
docs/design.mdSection 3.2 WAL位置
Section 3.2 "CURRENT / MANIFEST 权威性"(~line 420)与 "WAL 元数据持久化协议"(~line 181)
问题描述
设计明确声明
CURRENT只是写入侧辅助文件,recovery 权威源是MANIFEST + 目录扫描。但 durable-ready 协议要求在 segment 可承载写入前更新CURRENT并 fsync(步骤 6-7)。这意味着CURRENT更新是 batch 确认成功的前提之一,但 recovery 又不依赖它。两个路径对 CURRENT 的依赖程度不一致:
建议修复
方案 A(推荐):简化 durable-ready 协议,移除 CURRENT 更新作为 batch 确认前提。
方案 B:让 CURRENT 成为 recovery 的必要组件。