refactor(p0-5): 收敛热度相关注释

背景叙述与历史取舍已写进 `docs/design/hot-ranking.md`,从源码删除。
只保留不变式与安全约束:`clientFoundRows` 禁令、唯一索引判重、
成员补零的排序约定、快照用 `RENAMENX` 只建一次、`EXPIRE` 失败即删键。

`video_service.go` 的 `NewVideoService` 注释原本复述已删方法的来历,一并收敛。
`zset.go` 的 `ZUnionStore` 与 `RenameNX` 注释各压到四行以内。

验证:go build ./... 通过。
验证:go vet ./... 通过。
验证:go test -count=1 ./... 全绿(本机无 cgo,未跑 -race)。
验证:go test -tags integration -p 1 -count=1 ./internal/feed/ ./internal/video/ ./internal/worker/ 全绿。
This commit is contained in:
2026-11-01 16:47:31 +08:00
parent 006ec5f196
commit d782ccbb53
16 changed files with 74 additions and 132 deletions

View File

@@ -48,8 +48,7 @@ func (s *LikeService) Like(ctx context.Context, like *Like) error {
like.CreatedAt = time.Now()
// 意图键只用于日志关联(LikeEvent.EventID),不再参与去重:
// 判重由 likes 的唯一索引在事务里做,重复投递不会重复计数。
// 意图键只用于日志关联,不参与去重:判重由唯一索引在事务里做。
intentKey, err := NewIntentKey()
if err != nil {
return err