知识卡片
跨服务付款失败留下未批准订单
原书电商教学案例中,订单服务先生成订单号并把订单写库,随后远程调用付款服务;若信用卡已过期,付款被拒,订单记录却已插入而未获批准。根因是订单写入与付款结果跨服务、跨事务,先前提交不能随付款失败自动回滚。此卡只记录问题;原书给出的恢复动作见[[付款失败后补偿订单写入]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Service-Based Architecture Style · 查看原书依据
Now the data is in an inconsistent state: the order information has already been inserted, but has not been approved.
参考来源
- 位置:《Fundamentals of Software Architecture》原书第14章《Service-Based Architecture Style》(阅读计划第17项;源文件:`OEBPS/ch14.html`)
- 结论依据:原文按订单先写入、远程付款失败、订单未批准的顺序说明跨服务一致性问题。
- 原始内容:Now the data is in an inconsistent state: the order information has already been inserted, but has not been approved.