← 返回刚才阅读的位置

知识卡片

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

末写胜出会丢并发意图

理解等级:高级

LWW按时间戳及确定性规则选胜者,适合接受覆盖语义的数据。两个离线修改即使最后收敛,也可能丢掉一个用户意图;物理时钟误差还会影响胜者。原书把LWW集合直接用于库存只是示意,不能据此保证不超卖。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Consistency and Availability · 查看原书依据

      In our product catalog example, we can use a state-based CRDT called an LWW-Element-Set (Last-Write-Wins-Element-Set) to manage the products and their details. An LWW-Element-Set allows for adding and removing elements, and it automatically resolves conflicts by favoring the most recent update based on a timestamp or a logical clock.

    参考来源

    - 位置:《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) - 结论依据:原文给出本卡对应定义或示例;LWW按时间戳及确定性规则选胜者,适合接受覆盖语义的数据。 对原文省略和过度承诺的限定是本卡显式纠正,不能反过来当作原书已证明。 - 原始内容:In our product catalog example, we can use a state-based CRDT called an LWW-Element-Set (Last-Write-Wins-Element-Set) to manage the products and their details. An LWW-Element-Set allows for adding and removing elements, and it automatically resolves conflicts by favoring the most recent update based on a timestamp or a logical clock.