A late acknowledgement from an expired attempt can overwrite the retry attempt
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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時間 37分
- マージ済み PR(30日)
- 22
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codingjoe/threadmill のほかの issue
-
Add worker pool telemetry再び着手できるかも @codingjoe が 102 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
codingjoe/threadmill#18 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
codingjoe/threadmill の issue をすべて見る
似ている issue
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
python-version
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
bug javascript P2-medium python release:v3.1
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adrirubio/claude-deck#546 ·
メンテナーはふだん 1 日以内に返信
-
area: desktop area: website priority: P2 type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
appandflow/stim#3411 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信