← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 2313.e.5.f.10.a.4.a.1.a

两阶段锁的收缩约束

理解等级:中级

两阶段锁把事务分成加锁的增长期与只释放、不再取得新锁的收缩期,用于保证可串行化。严格两阶段锁将写锁保留到提交或回滚,可避免读到未提交修改。它会引入等待与死锁风险,并不意味着所有副本瞬时同步。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Consistency and Availability · 查看原书依据

      Two-Phase Locking (2PL): 2PL is a concurrency control protocol used to maintain serializability and ensure strong consistency. In the first phase (growing phase), transactions acquire locks on the data items they need to access or modify.

    参考来源

    - 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第04章《Consistency and Availability》(来源项目book-sources;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch04.xhtml) - 结论依据:原文的机制或对比支持以下核心判断:两阶段锁把事务分成加锁的增长期与只释放、不再取得新锁的收缩期,用于保证可串行化。 本卡将相邻说明中的适用限制保留为解释。 - 原始内容:Two-Phase Locking (2PL): 2PL is a concurrency control protocol used to maintain serializability and ensure strong consistency. In the first phase (growing phase), transactions acquire locks on the data items they need to access or modify.