知识卡片
可验证操作支持恢复
针对[[扣款发货故障可留下未知结果]],恢复前必须能确认单步结果:可以把单步做成本地事务,或让相同订单重试不再产生额外副作用,或通过状态API查询。例如配送服务记住已处理订单并忽略重复请求,便可安全重试结果不明的调用。可验证性只解决“这一步发生了吗”,仍需处理跨步依赖和补偿是否可行。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 保持状态一致 · 查看原书依据
The operation is idempotent. If we repeat the operation with the same data, no additional side effects occur. For example, if our shipping service ships only once for a single order, even if we call the shipping service multiple times with the same data, it is idempotent. The implementation remembers processed requests and ignores any duplicates.
参考来源
- 位置:《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)
- 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。
- 原始内容:The operation is idempotent. If we repeat the operation with the same data, no additional side effects occur. For example, if our shipping service ships only once for a single order, even if we call the shipping service multiple times with the same data, it is idempotent. The implementation remembers processed requests and ignores any duplicates.