知识卡片
时间戳规则阻止等待环
wait-die 只允许老事务等年轻事务,年轻方要等老方时自己中止。wound-wait 允许年轻事务等老方,老方碰到年轻事务持锁则中止持锁者。所有等待边朝同一时间戳方向,无法形成循环。两种方案的中止对象不同,适用性取决于冲突与回滚成本。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 5. Transaction Processing and Recovery Lock-Based Concurrency Control · 查看原书依据
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.
参考来源
- 位置:《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.