知识卡片
墓碑保留到无可遮蔽
即使一次压实未看到旧值,另一个未参与的文件仍可能藏有旧记录,因此墓碑必须等到存储层确认旧值不会再被读到才可清理。书中将 RocksDB 的底层边界与 Cassandra 的回收宽限期对照,后者还要给副本观察删除留时间。
参见 [[墓碑阻止旧值复活]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 7. Log-Structured Storage Maintenance in LSM Trees · 查看原书依据
During compaction, tombstones are not dropped right away. They are preserved until the storage engine can be certain that no data record for the same key with a smaller timestamp is present in any other table.
参考来源
- 位置:《Database Internals》Chapter 7. Log-Structured Storage(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch07.html#idm46104531635176,段 127)
- 结论依据:第 126–127 段说明过早丢弃墓碑会使原数据复活。
- 原始内容:During compaction, tombstones are not dropped right away. They are preserved until the storage engine can be certain that no data record for the same key with a smaller timestamp is present in any other table.