知识卡片
用双集合记录添加与删除
仅增长集合的每个副本可独立追加元素,合并用集合并集。若要删除,可同时保存添加集和删除集,当前成员由添加集减去删除集得到。删除元素在添加集中出现过。采用这一双集合,已删除元素仍保留移除标记。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 11. Replication and Consistency Strong Eventual Consistency and CRDTs · 查看原书依据
Another example of CRDTs is an unordered grow-only set (G-Set). Each node maintains its local state and can append elements to it. Adding elements produces a valid set. Merging two sets is also a commutative operation. Similar to counters,
参考来源
- 位置:《Database Internals》Chapter 11. Replication and Consistency(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch11.html#idm46104530060792,段 231)
- 结论依据:原文解释两个集合的不变量和读出时集合差。
- 原始内容:Another example of CRDTs is an unordered grow-only set (G-Set). Each node maintains its local state and can append elements to it. Adding elements produces a valid set. Merging two sets is also a commutative operation. Similar to counters,