知识卡片
可串行化防止取款偏斜
让查询两户合计并执行取款的事务遵循可串行化。若一笔先完成,另一笔按等价串行顺序只看见剩余 50,不能再批准 200;实现需协调同时读写相交状态的执行,使这两笔不可能基于同一个旧合计都成功。调度可能引入等待或冲突重试。
参见 [[并发取款写偏斜]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 5. Transaction Processing and Recovery Isolation Levels · 查看原书依据
The strongest isolation level is serializability. As we already discussed in “Serializability”, it guarantees that transaction outcomes will appear in some order as if transactions were executed serially (i.e., without overlapping in time).
参考来源
- 位置:《Database Internals》Chapter 5. Transaction Processing and Recovery(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch05.html#isolation_levels,段 163)
- 结论依据:第 159 段给出取款约束,紧随的第 163–169 段给出可串行化保证及快照隔离边界;第 166 段指出冲突协调成本。
- 原始内容:The strongest isolation level is serializability. As we already discussed in “Serializability”, it guarantees that transaction outcomes will appear in some order as if transactions were executed serially (i.e., without overlapping in time).