← 返回刚才阅读的位置

知识卡片

支付系统案例卡 · 2851.d.4

扣款发货故障可留下未知结果

理解等级:高级

先扣款再发货时,发货失败会留下付款与履约不一致;若进程恰在发货中失败,重启后甚至不知货是否已发。再次执行可能增加副作用,处理故障的响应本身也会失败。仅仅按顺序调用两个成功API不能证明整个购买流程一致。应对方法见[[可验证操作支持恢复]]与[[购买失败需要业务补偿]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 保持状态一致 · 查看原书依据

      For example, we charge for the book, and then we ship it. If shipping fails, we retry the transaction, and if it fails too, we return the money (void the transaction if by bank card) and notify the customer. If any of the responses to failure fail, we need to handle that issue too. However, addressing this issue is easier said than done because it requires complicated code. For example, if the service fails while we are performing the shipping operation, when the system recovers, we might not know the outcome of the shipping operation.

    参考来源

    - 位置:《Software Architecture and Decision-Making》第07章《保持状态一致》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch07.xhtml) - 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。 - 原始内容:For example, we charge for the book, and then we ship it. If shipping fails, we retry the transaction, and if it fails too, we return the money (void the transaction if by bank card) and notify the customer. If any of the responses to failure fail, we need to handle that issue too. However, addressing this issue is easier said than done because it requires complicated code. For example, if the service fails while we are performing the shipping operation, when the system recovers, we might not know the outcome of the shipping operation.