知识卡片
刷盘完成才能回收日志
接受过的写应和内存表冻结使用同一顺序屏障,否则晚到的写可能落进入已经刷出的旧区间。新表接写、旧表留读,磁盘产物完成后原子替换读视图,最后才裁剪覆盖该表的日志段。若提前截断,崩溃后不存在可重放的数据来源。
参见 [[内存表刷盘期间保持可读]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 7. Log-Structured Storage Concurrency in LSM Trees · 查看原书依据
These operations have severe correctness implications. Continuing writes to the old memtable might result in data loss; for example, if the write is made into a memtable section that was already flushed.
参考来源
- 位置:《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#lsm_concurrency,段 259)
- 结论依据:第 245–262 段列出同步点、屏障示例及数据丢失路径。
- 原始内容:These operations have severe correctness implications. Continuing writes to the old memtable might result in data loss; for example, if the write is made into a memtable section that was already flushed.