其实跟我关系不大,这次理论既然人家公开了调查报告,自然会看,至少学习一下。我自己的结论很简单,既然是 fetch_features 它是返回 Result<(), (ErrorFlags, i32)> 那当然不应该用 unwarp ,而是返回一个带 ErrorFlags 的空值。如果加载配置不成功,那就不加载。像 nginx 默认的行为就可以。 fetch_features 它并不是核心功能,无论如何都不应该因为一个边缘设计搞整个系统搞掉。
然后,当我去一些流量比较大的看网站上看相关的讨论,比如说这一篇,
https://www.reddit.com/r/rust/comments/1p0susm/comment/nplauce/ 它会说一些在我看来很奇怪的东西:
> From what I can gather, that unwrap wasn't the root cause of this problem.
> Rather, it was the end of a chain of cascading failure.
> Even if this particular error were handled, the series of problems
> that led up to it would have still left things in a questionable state.
如果是一两个也就算了,我看到不止一个类似的评论,不止这一个贴或这一个平台,都是很多点赞。所以我现在真的不会了,想找人交流一下,我的结论到底有什么问题?为什么人有会说这事还有什么根本问题,不是 unwarp 的锅?