知识卡片
等待图检测死锁
事务等待他人持有的锁时,从等待者指向持有者。等待图中出现环意味着环上事务都不能前进;可在新增边时检查,或定期检测。选一个事务中止并释放锁,其他事务便可能继续。超时处理简单,但也可能误判正常的长等待。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 5. Transaction Processing and Recovery Lock-Based Concurrency Control · 查看原书依据
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
参考来源
- 位置:《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