知识卡片
快照隔离仍允许写偏斜
事务读取开始时间之前已提交的值;并发写同一个单元格时,先提交的一方胜出。若两个事务基于同一个快照修改互不重叠的记录,都可能提交。适用边界取决于业务约束是否横跨多个记录,而非事务里的读取是否始终一致。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 13. Distributed Transactions 快照隔离与 Percolator · 查看原书依据
Snapshot isolation guarantees that all reads made within the transaction are consistent with a snapshot of the database. The snapshot contains all values that were committed before the transaction’s start timestamp. If there’s a write-write conflict (i.e., when two concurrently running transactions attempt to make a write to
参考来源
- 位置:《Database Internals》Chapter 13. Distributed Transactions(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch13.html#percolator,段 107)
- 结论依据:原文定义快照和首个提交者获胜,并用不同记录组成的约束反例解释写偏斜。
- 原始内容:Snapshot isolation guarantees that all reads made within the transaction are consistent with a snapshot of the database. The snapshot contains all values that were committed before the transaction’s start timestamp. If there’s a write-write conflict (i.e., when two concurrently running transactions attempt to make a write to