MemRelay-Operation: checkpoint-save:r3-67-queue-close-deadlock-20260930 MemRelay-Resource: 0013a18c-bf1b-40b5-a9cb-bbd3ad6e6848
1.5 KiB
1.5 KiB
title, type, permalink, stable_id, scope, memory_type, project_id, usage_profile_id, status, revision, request_id, created_at, updated_at, tags
| title | type | permalink | stable_id | scope | memory_type | project_id | usage_profile_id | status | revision | request_id | created_at | updated_at | tags | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Checkpoint 2026-09-30 09:28:54 UTC [3c19908d0f] | checkpoint | main/projects/25464650-ed5d-440e-b362-190f2852d451/checkpoint-2026-09-30-09-28-54-utc-3c19908d0f | 0013a18c-bf1b-40b5-a9cb-bbd3ad6e6848 | project | checkpoint | 25464650-ed5d-440e-b362-190f2852d451 | 0c9feb46-d06e-43cd-9ef0-c5813c84a998 | active | 1 | r3-67-queue-close-deadlock-20260930 | 2026-09-30T09:28:54.981235+00:00 | 2026-09-30T09:28:54.981235+00:00 |
|
检查点:R3-03 / issue #67 写队列 Close 死锁已修
完成
- 分支
feat/fix-r3-67-queue,工作树E:/code/NixMsg-wt/r3-67(非主工作树) - HEAD
eb4cb7c655e5bb6796c2514aaa4a714d0b4c3b3e:fix: 写队列满时 Close 不再与 enqueue 死锁 - 已推送 origin;已在 Gitea #67 评论(comment 485)
- 未合 main
关键实现
Queue.closing:Close 先 Swap(closed)+close(closing),唤醒持读锁堵在满通道上的 enqueue- enqueue 的 select 同时等 q.ch / closing / ctx.Done()
- 再 sendMu.Lock 后 close(q.ch),等 loop 退出;不向已关闭 channel 发送
- DEVIATIONS 末尾
### 复审修复 R3-03
验证
go test ./internal/store/ -count=1 -run "Queue|WriteQueue"通过- 新增:满通道+堵住写端时 Close 能解开 enqueue;超时 Drain 短时返回
下一步
- 总控审阅后 ff-only 合入 main
给下个会话
- 只改了 queue.go / queue_test.go / DEVIATIONS R3-03;不改迁移