Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

A late acknowledgement can overwrite the retry attempt that replaced it

已關閉
#80 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 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 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。