知识卡片
日志编码要覆盖任意输入
用制表符和换行分隔事件易于演示,但键值若包含空白或换行就可能破坏解析,过大记录也会耗尽存储。记录格式须明确编码、长度限制和解析失败行为;还要检查读取器错误与序号单调性。原书列出这些缺口,不能把示例日志当作支持任意字符串的可靠格式。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Building a Cloud Native Service · 查看原书依据
Keys and values aren’t encoded in the transaction log: multiple lines or whitespace will fail to parse correctly. The sizes of keys and values are unbound: huge keys or values can be added, filling the disk. The transaction log is written in plain text: it will take up more disk space than it probably needs
参考来源
- 位置:《Cloud Native Go》第05章《Building a Cloud Native Service》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch05.xhtml)
- 结论依据:用制表符和换行分隔事件易于演示,但键值若包含空白或换行就可能破坏解析,过大记录也会耗尽存储。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。
- 原始内容:Keys and values aren’t encoded in the transaction log: multiple lines or whitespace will fail to parse correctly. The sizes of keys and values are unbound: huge keys or values can be added, filling the disk. The transaction log is written in plain text: it will take up more disk space than it probably needs