← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 4545.g.3.b.1

缓冲写入需要独立错误通道

理解等级:中级

把事件送入有限容量通道,由单一后台写入者顺序记录,可吸收短突发。通道满后生产者仍会阻塞;异步写入的错误发生在调用返回之后,需要另一条错误报告路径。错误通道也有容量,若无人消费可能再次阻塞,因此异步化必须连同错误处理一起设计。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      While that makes for a more efficient write, it also means that WritePut and WriteDelete can’t simply return an error when they encounter a problem, so we provide a dedicated error channel to communicate their errors instead. Creating a New FileTransactionLogger If you’ve followed along so far you may have noticed that none of the

    参考来源

    - 位置:《Cloud Native Go》第05章《Building a Cloud Native Service》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch05.xhtml) - 结论依据:把事件送入有限容量通道,由单一后台写入者顺序记录,可吸收短突发。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。 - 原始内容:While that makes for a more efficient write, it also means that WritePut and WriteDelete can’t simply return an error when they encounter a problem, so we provide a dedicated error channel to communicate their errors instead. Creating a New FileTransactionLogger If you’ve followed along so far you may have noticed that none of the