设计审查: WAL segment 大小未定义,最大 batch 可能无法写入空 segment #15
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?
来源: docs/design.md §3.2 WAL Oracle 架构审查
问题描述
WAL Batch
entriesSize上限为 4MB,但设计中没有定义 WAL segment 文件的大小上限。如果 segment 剩余空间不足以容纳编码后的完整 batch(包含 Physical Record 头部、Block 对齐 padding),且 WAL Batch 不得跨 segment,那么某些合法的 batch 将无法写入任何 segment。需要明确
maxSegmentPayload >= maxEncodedBatch(含 Physical Record 头部 + Block padding 的最坏情况)?建议约束
否则某些合法 batch 会触发 write-stopped。
影响范围