Files
MemRelay/projects/25464650-ed5d-440e-b362-190f2852d451/Checkpoint 2026-09-30 07-48-01 UTC [74b75a5315].md
T
memrelay f5941cdba3 create: Checkpoint 2026-09-30 07:48:01 UTC [74b75a5315]
MemRelay-Operation: checkpoint-save:nixmsg-c01-c03-a4e51ec-20260930
MemRelay-Resource: fc447801-da3d-43d2-a272-6048861a19b4
2026-09-30 15:48:06 +08:00

59 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Checkpoint 2026-09-30 07:48:01 UTC [74b75a5315]
type: checkpoint
permalink: main/projects/25464650-ed5d-440e-b362-190f2852d451/checkpoint-2026-09-30-07-48-01-utc-74b75a5315
stable_id: fc447801-da3d-43d2-a272-6048861a19b4
scope: project
memory_type: checkpoint
project_id: 25464650-ed5d-440e-b362-190f2852d451
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: nixmsg-c01-c03-a4e51ec-20260930
created_at: '2026-09-30T07:48:01.548320+00:00'
updated_at: '2026-09-30T07:48:01.548320+00:00'
tags:
- ready-to-merge
- C-01
- C-02
- C-03
- lane/message
- feat/fix-message-c01-c03
---
## 消息线复审 C-01 / C-02 / C-03 已完成并推送(未 merge main)
- **线**:消息 M
- **任务**:C-01(#32)→ C-02(#33)→ C-03(#34)
- **工作树**:`E:\\code\\NixMsg-wt\\r2-c2`
- **分支**:`feat/fix-message-c01-c03`(已普通推送 origin,非 force,未合 main)
- **HEAD**:`a4e51ec` `fix: 按完成时刻分批清理并限制读连接池`
- **未 merge main**;未关 Gitea issues;未改 `PublishDown` 签名;停机等待留给 L-03
## 基线与合并
1. `git worktree add -b feat/fix-message-c01-c03 E:\\code\\NixMsg-wt\\r2-c2 origin/feat/fix-message-c04-c07`
2. `git merge origin/feat/fix-broker-b01-b12` → `a485b52`(含 B-02 PacketID 大帧名额)
3. `git merge origin/feat/fix-store-d01-d05` → `825e13c`(含 D-02 Checkpoint)
- 冲突:DEVIATIONS 自动保留双方。未改 PublishDown。
## 提交
- `eca4c83` fix: 仅向已握手连接推送并拆分调度循环(C-01;回执在途实现随 push.go 一并进入)
- `75f4647` fix: 回执按连接去重在途且不改可重复约定(C-02 测试 + DEVELOPMENT §10 receipt_ack 一句)
- `a4e51ec` fix: 按完成时刻分批清理并限制读连接池(C-03)
## 完成内容(issue 统一方案)
1. **C-01**:只对 `LiveConn.Ready` / `handshook` 连接推送;每连接 cap-1 worker;`StartLoops` 拆分发/到期/小时清理;`messageLoops` 只调 `StartLoops` + 15s 采指标;删除 message 包 `largeSem`;`ErrBackpressure`/`ErrNotSubscribed`/`ErrNoConnection` 当发布失败(清标记、1s 重推);`RecoverOnStart` 不再 `DispatchDue`。
2. **C-02**:`rcptInflight` 按连接去重;失败撤销;确认超时后才允许重发;重复 ack 不唤醒;`ReceiptAck` 成功才移出在途并唤醒。产品仍允许断线后重复。裸设备须 `receipt_ack` 或 `receipt:false`。
3. **C-03**:`ExpireOnce` 500/批 + 僵尸宽限;`PurgeOnce` 分写操作后 `Queue.Checkpoint`;迁移 `0004_cleanup_indexes.sql`(避开 U-02 的 0003,原 0003/0005 合并改号):`completed_at` + 清理索引;收尾写 `completed_at`;清理 `COALESCE(completed_at, send_at)`;读池 MaxOpen=64 / MaxIdle=16 / idle 5m / `query_only`。`db_test.go` 仅计数 2→3、备份名 v1-to-v4。
## 验证
`go test ./internal/app/message/ ./internal/broker/ ./cmd/nixmsg/ ./internal/store/ -count=1` 一次通过(message 1.7s / broker 6.3s / cmd/nixmsg 7.3s / store 1.5s)。
## 未做 / 给下个会话
- 不要 merge main;不要强推 main;不要关 issue。
- 不要占用 `E:\\code\\NixMsg-wt\\r2-c`(C-04–C-07)或删 `E:\\code\\NixMsg-wt\\fix3`。
- serve 停机/WaitLoops 留给 L-03。
- 总控可审阅后 ff-only 合 `feat/fix-message-c01-c03`(建议在 C-04–C-07、B-01–B-12、D-01–D-05 之后,本分支已 merge 后两者与 C-04–C-07)。
- 标签:ready-to-merge