A late acknowledgement from an expired attempt can overwrite the retry attempt
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
Start with acknowledge.lua, then trace the lease-expiry retry flow and the worker_ids data mentioned in the issue. Reproduce the sequence where an expired attempt is requeued and a newer attempt reacquires the task. Done means a late acknowledgement from the old attempt cannot remove, publish for, or delete state belonging to the newer attempt.
由索引模型根据 Issue 内容生成。
描述
Found by the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb).
acknowledge.lua identifies an in-flight attempt only by its membership in the running set:
local removed = redis.call('ZREM', KEYS[1], ARGV[1])
if removed == 0 then
return 0 -- Task already reaped, skip
end
The reaper requeues a task after its lease expires. A second attempt then acquires the same task ID and the entry exists again. A late acknowledgement from the original attempt finds the entry and wins. It does three things:
- It removes the running entry of the second attempt.
- It publishes the result of the first attempt.
- It removes the task hash (
DEL KEYS[3]) that the second attempt still uses.
The second attempt continues to run with its state removed. When it finishes, its acknowledgement is a no operation and the backend discards its result. worker_ids already records which worker holds which attempt. Fencing on the acquiring worker or on an attempt token can correct this.
This error is not the same as the claim race in #71. #71 guards the decision of the broker. This error is the acknowledgement of the worker that arrives after a requeue.
- 主要语言
- Python
- 星标
- 19
- 派生
- 1
- 平均合并
- 14 小时 39 分钟
- 30 天内合并 PR
- 21
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codingjoe/threadmill 的其他 Issue
-
Add worker pool telemetry可能重新可做 @codingjoe 于 100 天前认领,目前没有进行中的 PR。 未关闭enhancement
codingjoe/threadmill#18 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 codingjoe/threadmill 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
Deepak3699/Ai_Mentor#244 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
btclib-org/btclib-node#1880 ·
维护者通常 1 天内回复
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handled可能已有人在做 @khuisman 今天认领。 未关闭v0.9.2
难度 1/5 1 小时以内 新手友好度 84/100
khuisman/mcp-gee-sweet#941 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
pyjanitor-devs/pyjanitor#1758 ·
维护者通常 1 天内回复
-
bug ready for review
难度 2/5 1-3 小时 新手友好度 86/100
odysseus-dev/odysseus#6641 ·
维护者通常 1 天内回复