[Critical] 恢复后未确认 Batch 可能变成已发布 #8
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 "恢复完成状态"(~line 575)与 "持久化策略"(~line 96)
问题描述
Recovery 重放所有 CRC 合法、sequence 连续的 WAL batch,并在恢复完成后将其全部标记为
published。但其中可能包含崩溃前从未 fsync 确认(调用方未收到成功)的 batch。场景:
write()写入 OS page cache影响
Always策略下,调用方收到的语义是 "Put 返回成功 = 已持久化"。但如果进程 crash(非掉电),未确认的写入可能变成已发布。这是一个 API 语义问题而非数据安全问题。建议修复
在 Section 3.2 "持久化策略" 或 "恢复完成状态" 中显式声明: