[Critical] Segment 边界跨 Batch 行为未定义 #6
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 "Block 边界处理"(~line 303)与 "Recovery 扫描流程"(~line 436)
问题描述
WAL Batch 可拆成多个 Physical Record 跨多个 Block,但未定义 WAL Batch 是否可以跨 segment 文件。Recovery 中 incomplete fragment 的处理取决于是否位于"最后一个需要恢复的 segment"(~line 493):
当前 recovery 流程按 segment 顺序独立扫描,未定义跨 segment fragment 收集。
影响
可能导致合法的跨 segment batch 被误判为中间损坏,或需要引入复杂的跨 segment 状态管理。
建议修复
在 Section 3.2 明确添加约束: