docs(vloop): 修正中危与低危条目的代码断言
第二轮按审计清单处理 20 章的 92 条中危与低危条目。 主要修正:包数与测试分布;AutoMigrate 只由 API 调用一次;预取档位 50/10/1;热榜快照 TTL 与索引列;锁键拼接;as_of 单位;行号引用改为文件加符号。 验证:node tools/build-nav.js 与 node tools/check-pages.js 退出 0,29 个页面全部通过。
This commit is contained in:
@@ -137,7 +137,7 @@ if err := ApplyHotDelta(ctx, s.cache, like.VideoID, 1, at); err != nil {
|
||||
_ = cache.Del(context.Background(), cache.Key("video:detail:id=%d", videoID))
|
||||
_ = cache.Del(context.Background(), cache.Key("video:entity:%d", videoID))
|
||||
|
||||
bucket := occurredAt.Format("200601021504") // UTC 分钟
|
||||
bucket := HotBucket(occurredAt) // 桶名:UTC 截断到分钟
|
||||
key := cache.Key("hot:video:1m:%s", bucket)
|
||||
member := HotMember(videoID) // "%012d"
|
||||
opCtx, cancel := context.WithTimeout(ctx, hotOpTimeout) // 100ms
|
||||
|
||||
Reference in New Issue
Block a user