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
- 星號
- 21
- 分支
- 2
- 平均合併
- 12 小時 38 分鐘
- 30 天內合併 PR
- 27
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
相似的 Issue
-
難度 1/5 1-3 小時 新手友好度 85/100
WLAN-Pi/wlanpi-profiler#341 ·
維護者通常 1 天內回覆
-
Memory leak: the shared `validation_aborted_error` keeps every traceback it is raised through可能已有人在做 @Fire162 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
graphql-python/graphql-core#287 ·
-
難度 2/5 1-3 小時 新手友好度 67/100
roman-corgi/ctc-dip#160 ·
維護者通常 1 天內回覆
-
type-bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows host可能已有人在做 @Aaqibhafeezkhan 今天認領。 未關閉bug good first issue mentored python size: XS up-for-grabs
難度 2/5 1-3 小時 新手友好度 75/100
dheerajjha/mcp-migrate#366 · 1 則留言 ·
維護者通常 1 天內回覆