知识卡片

普通读书笔记卡 · 1766.c.1.b

Saga不能替代强一致边界

理解等级:高级

Saga参与者各自提交事务,整体只最终一致,补偿也不是把多个提交变成原子事务。若业务正确性要求两个数据点在同一决策中强一致,应把它们纳入适当聚合边界,不能用Saga补救错误拆分。采用Saga前先确认中间状态和最终一致确实可被业务接受。

相关:[[Saga编排跨事务流程]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 通信模式 · 查看原书依据

      Although the saga pattern orchestrates a multicomponent transaction, the states of the involved components are eventually consistent. And although the saga will eventually execute the relevant commands, no two transactions can be considered atomic. This correlates with another aggregate design principle: Only the data within an aggregate’s boundaries can be considered strongly consistent. Everything outside

    参考来源

    - 位置:《Learning Domain-Driven Design》第9章《通信模式》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch09.html) - 结论依据:原文围绕本卡所述机制给出定义、适用条件及相关取舍,以下摘录为直接依据。 - 原始内容:Although the saga pattern orchestrates a multicomponent transaction, the states of the involved components are eventually consistent. And although the saga will eventually execute the relevant commands, no two transactions can be considered atomic. This correlates with another aggregate design principle: Only the data within an aggregate’s boundaries can be considered strongly consistent. Everything outside