A late acknowledgement can overwrite the retry attempt that replaced it
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- lua, redis
研究方向
Start with threadmill/backends/lua/acknowledge.lua and read the README section describing retries that outlive their leases. Trace how a late acknowledgement interacts with the reaper's requeued attempt, then define done as preventing the stale result from replacing the current attempt or removing its running state; the issue leaves the fencing approach open.
由索引模型根據 Issue 內容生成。
描述
Found while reviewing PR #69 with the SuperJoe crew (pre-existing, untouched by that patch), filed as out-of-scope there.
acknowledge.lua fences only on running-set membership: it ZREMs the id and proceeds only when the id was there. A worker whose lease expired but which is still running can acknowledge after the reaper requeued the task for a retry: the reaper's claim re-armed the running entry, so the late ack's ZREM succeeds. It then writes the stale result, deletes the task hash, and removes the new attempt's running entry — while the deferred entry the retry created survives and runs the task again.
The README already documents that a retry may execute concurrently with a task that outlived its lease, so duplicate execution is expected. What is not expected is the late ack publishing a result for the wrong attempt and destroying the retry's state.
Options:
- fence the ack on the attempt it was leased for, e.g. a per-attempt token written beside the lease and compared by the script, or
- let an ack lose to a renewed claim.
Reference: threadmill/backends/lua/acknowledge.lua.
- 主要語言
- Python
- 星號
- 21
- 分支
- 2
- 平均合併
- 12 小時 38 分鐘
- 30 天內合併 PR
- 27
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
volcengine/OpenViking#6445 ·
維護者通常 1 天內回覆
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be edited可能已有人在做 @ManyaJain111 今天認領。 未關閉bug enhancement possible-duplicate
難度 2/5 1-3 小時 新手友好度 77/100
AOSSIE-Org/PictoPy#1637 · 4 則留言 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
deepspeedai/DeepSpeed#8884 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
flagos-ai/FlagQuantum#718 ·
維護者通常 1 天內回覆
-
bug CI-failure high priority
難度 1/5 1 小時以內 新手友好度 86/100
vllm-project/afd-plugin#483 ·
維護者通常 1 天內回覆