知识卡片

问题卡 · 1980.z.6.b.2.b

补偿失败使结果难以解释

理解等级:高级

调查服务不可用后,协调器要求工单从完成恢复到处理中,补偿本身仍可能失败。此时原更新保留,用户却可能收到失败并重试,继而遇到“已完成”的另一错误。补偿与正向操作一样都是会失败的远程动作,必须明确记录真实状态与修复责任;不能从“调用了撤销”推断“系统已恢复原状”。整体原子模拟还会让用户等待纠错,响应更差。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 事务Saga · 查看原书依据

      In this case, as shown in Figure 12-24, there is confusion about what sort of response to send back to the end user (in this case, the Sysops Squad expert). The ticket status is already marked as complete because the compensation failed, so attempting the “mark as complete” request again might only lead to yet another error (such as Ticket already marked as complete). Talk about confusion on the part of the end user!

    参考来源

    - 位置:《Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)》第12章《Chapter 12. Transactional Sagas》(来源项目:book-sources;源文件:extracted/Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)/_epub-src/OEBPS/ch12.xhtml) - 结论依据:原文的定义、示例或失败路径支持以下归纳:调查服务不可用后,协调器要求工单从完成恢复到处理中,补偿本身仍可能失败。 其他条件结合本章同小节说明;不将模式目标当成已有运行保证。 - 原始内容:In this case, as shown in Figure 12-24, there is confusion about what sort of response to send back to the end user (in this case, the Sysops Squad expert). The ticket status is already marked as complete because the compensation failed, so attempting the “mark as complete” request again might only lead to yet another error (such as Ticket already marked as complete). Talk about confusion on the part of the end user!