← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 4545.e.3.a

幂等约束重复动作的效果

理解等级:中级

同一操作重复执行与执行一次具有相同目标效果,称为幂等;完全不改变状态则是更强的无副作用情形。设置固定值与累加不同。幂等有助于处理“请求可能成功但响应丢失”的重试,但并不要求每次返回码相同,也不允许覆盖中间合法更新而忽略并发条件。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Building a Cloud Native Service · 查看原书依据

      In the programming world, an operation (such as a method or service call) is idempotent if calling it once has the same effect as calling it multiple times. For example, the assignment operation x=1 is idempotent, because x will always be 1 no matter how many times you assign it. Similarly, an HTTP PUT method

    参考来源

    - 位置:《Cloud Native Go》第05章《Building a Cloud Native Service》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch05.xhtml) - 结论依据:同一操作重复执行与执行一次具有相同目标效果,称为幂等;完全不改变状态则是更强的无副作用情形。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。 - 原始内容:In the programming world, an operation (such as a method or service call) is idempotent if calling it once has the same effect as calling it multiple times. For example, the assignment operation x=1 is idempotent, because x will always be 1 no matter how many times you assign it. Similarly, an HTTP PUT method