知识卡片

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

时间戳规则阻止等待环

理解等级:高级

wait-die 只允许老事务等年轻事务,年轻方要等老方时自己中止。wound-wait 允许年轻事务等老方,老方碰到年轻事务持锁则中止持锁者。所有等待边朝同一时间戳方向,无法形成循环。两种方案的中止对象不同,适用性取决于冲突与回滚成本。

这张卡片看不懂?

已有反馈 · 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#deadlocks,段 211) - 结论依据:第 208–213 段给出时间戳优先级与两种规则。 - 原始内容:T1 is allowed to block and wait for the lock. Otherwise, T1 is aborted and restarted. In other words, a transaction can be blocked only by a transaction with a higher timestamp.