← 返回刚才阅读的位置

知识卡片

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

等待图检测死锁

理解等级:中级

事务等待他人持有的锁时,从等待者指向持有者。等待图中出现环意味着环上事务都不能前进;可在新增边时检查,或定期检测。选一个事务中止并释放锁,其他事务便可能继续。超时处理简单,但也可能误判正常的长等待。

这张卡片看不懂?

已有反馈 · 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,段 207) - 结论依据:第 202–207 段从双锁等待示例引出检测与中止。 - 原始内容:Cycles in this graph indicate the presence of a deadlock: transaction T1 is waiting for T2 which, in turn, waits for T1. Deadlock detection can be done periodically (once per time interval) or continuously (every time the