← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 10294.a.4.a.4 · 生成模型:未记录

OCC把冲突检查留到提交

理解等级:中级

事务先在私有上下文计算并记录读集和写集,再验证是否和并发事务的访问集形成冲突,通过才发布写集。后向验证比较已经提交的事务,前向验证比较正验证的事务。验证与写入必须原子衔接,才能避免别的提交使验证瞬间失效。冲突多时,反复重跑私有阶段会很昂贵。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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#idm46104532329672,段 175) - 结论依据:第 171–183 段说明读、验证、写和两种验证方向。 - 原始内容:Read and write sets of concurrent transactions are checked for the presence of possible conflicts between their operations that might violate serializability. If some of the data the transaction was reading is now out-of-date, or it would