Commit Graph

8 Commits

Author SHA1 Message Date
1b47c9f027 refactor(video): 计数改由业务事务维护并删除热度第二条写路径
点赞与评论的计数只由业务事务写。ApplyLike、ApplyUnlike、CreateIdempotentWithPopularity 与 DeleteWithPopularity 各自在单事务内完成插行与计数。
热榜增量改为提交后的 best-effort 写。ApplyHotDelta 按行的 created_at 落分钟桶,写失败只记日志,DB 计数仍然正确。
删除 PopularityMQ 与 PopularityWorker。同一次互动因此只有一个写者,不再有两个门闩各自放行。
删除 hot:applied 占位键。判重改由 likes 的唯一索引与 uk_comments_author_key 负责。
DeleteWithPopularity 先读行再删行。评论删除因此回退热度,重复投递不再多减一次。
likes 与 comments 各加 (created_at, video_id) 覆盖索引,服务热榜窗口查询。
验证:go build -buildvcs=false ./... 通过。go test -buildvcs=false -count=1 ./... 全绿。
2026-11-01 15:15:15 +08:00
ffd9b0c8f0 chore: 补充后端核心模块的中文注释 2026-07-15 11:54:01 +08:00
leonincs
732e284369 style: 统一代码格式和行尾 2026-05-20 16:34:19 +08:00
Sisyphus
1cadc95863 fix: Social GetAllFollowers/Vloggers + Like ListLikedVideos 加 Limit(200) 防海量数据 2026-04-25 17:45:33 +08:00
tangerineyu
21efce6049 feat(config): 本地config文件缺失时使用默认配置 2026-03-24 19:05:06 +08:00
Leon
3800373166 feat: 点赞相关rabbitMQ 2025-12-30 01:23:54 +08:00
Leon
a21a79a2be feat: 添加了列出点赞视频的功能 2025-12-26 18:23:55 +08:00
Leon
9ba916643e move: 后端 2025-12-25 22:40:20 +08:00