← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2957.k

跨存储写入会撕裂

理解等级:中级

先修改数据库再发布消息,可能出现数据已提交而其他组件没有收到通知的状态。本地数据库事务无法覆盖独立消息系统;直接扩大为分布式事务又会引入复杂性、扩展与可靠性成本。应先识别这种跨机制一致性需求,本章将可靠发布的具体处理留到后文的outbox模式。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 实现简单业务逻辑 · 查看原书依据

      As in the previous example, any failure occurring after line 7 but before line 9 succeeds will corrupt the system’s state. The Users table will be updated but the other components won’t be notified as publishing to the message bus has failed. Unfortunately, fixing the issue is not as easy as in the previous example.

    参考来源

    - 位置:《Learning Domain-Driven Design》第5章《实现简单业务逻辑》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch05.html) - 结论依据:原文对该概念的定义、应用条件及相邻概念的比较支撑本卡解释。 - 原始内容:As in the previous example, any failure occurring after line 7 but before line 9 succeeds will corrupt the system’s state. The Users table will be updated but the other components won’t be notified as publishing to the message bus has failed. Unfortunately, fixing the issue is not as easy as in the previous example.