知识卡片

普通读书笔记卡 · 2851.a.1.a

TTL恢复活性但会过期

理解等级:高级

锁持有者崩溃后无人释放会使系统停滞,TTL让锁最终失效并允许接管。持有者却可能只是长时间暂停,恢复后仍以为自己有锁;因此TTL不能单独保证业务互斥。轮询或watch只改变竞争等待方式,得到通知后仍要原子竞争,不能把唤醒当作已持锁。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 10. Ownership Election · 查看原书依据

      A process could fail in the middle of holding the lock, and at that point there is no one left to release it. In such a situation, our system will become stuck. To resolve this, we take advantage of the TTL functionality of the key-value store. We

    参考来源

    - 位置:《Designing Distributed Systems, 2nd Edition》第10章《Chapter 10. Ownership Election》(来源项目 book-sources;源文件:extracted/Designing Distributed Systems, 2nd Edition/_epub-src/OEBPS/ch10.html) - 结论依据:原文先说明崩溃卡死,再引入TTL及慢进程过期问题。 - 原始内容:A process could fail in the middle of holding the lock, and at that point there is no one left to release it. In such a situation, our system will become stuck. To resolve this, we take advantage of the TTL functionality of the key-value store. We