知识卡片
事件解释并发冲突
状态式乐观锁只能告诉调用者版本已过期;事件溯源还可以读取此期间新增的具体事件,判断它们是否与当前操作在业务上冲突。只有确认不冲突时才可继续,不能把所有版本变化都默认忽略。是否兼容取决于领域规则。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 建模时间维度 · 查看原书依据
When using event sourcing, we can gain deeper insight into exactly what has happened between reading the existing events and writing the new ones. You can query the exact events that were concurrently appended to the event store and make a business domain–driven decision as to whether the new events collide with the attempted operation
参考来源
- 位置:《Learning Domain-Driven Design》第7章《建模时间维度》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch07.html)
- 结论依据:原文围绕本卡所述机制给出定义、适用条件及相关取舍,以下摘录为直接依据。
- 原始内容:When using event sourcing, we can gain deeper insight into exactly what has happened between reading the existing events and writing the new ones. You can query the exact events that were concurrently appended to the event store and make a business domain–driven decision as to whether the new events collide with the attempted operation