A stored payload that does not deserialize keeps the reaper in a loop
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Start in threadmill/backends/redis.py at RedisBroker._reap_task and compare its deserialization failure path with the replaced Lua reaper's finalize step. Trace the raw JSON fields and verify that an undeserializable task is finalized as FAILED, publishes a result, and is not re-claimed indefinitely.
索引モデルが issue の本文から書いたものです。
説明
Found by the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb).
RedisBroker._reap_task deserializes the stored task before it decides the fate of the task:
# threadmill/backends/redis.py
data = self.backend.client.hget(task_key, "data")
if data is None:
logger.warning("Claimed task %r has no task data; skipping", task_id)
return
task_result = self.backend.deserialize_task_result(data)
deserialize_task_result imports the task and its retry callback from the serialized dotted paths. A deployment can remove or rename the callback while the task waits in the queue. Then the import fails and the call raises on every pass. The surrounding logger.exception only writes a log record. The claim stays:
- The reaper claims the task again every
CLAIM_TTLand the same error occurs. - The task never reaches
FAILEDand never publishes a result. - Only expiry of the task hash or a late acknowledgement removes the running entry.
The replaced Lua reaper decoded the same payload with cjson and finalized it as FAILED without any import. This error is a regression from that rewrite.
Suggested correction: add a salvage branch to the reap path. The branch finalizes a payload that the code cannot deserialize. The raw JSON already carries status, errors, and the task fields. Patch it and publish it as FAILED. A small Lua script that copies the finalize step of the old reaper can do this. Then the behavior matches the pre-rewrite state and the retry decision does not return to Lua.
- 主要言語
- Python
- スター
- 17
- フォーク
- 1
- 平均マージ
- 2時間 31分
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codingjoe/threadmill のほかの issue
-
bloat side quest yeet
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
codingjoe/threadmill#79 ·
メンテナーはふだん 1 日以内に返信
-
bloat duh side quest
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
codingjoe/threadmill#81 ·
メンテナーはふだん 1 日以内に返信
-
side quest test yeet
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
codingjoe/threadmill#72 ·
メンテナーはふだん 1 日以内に返信
-
bug real side quest
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
codingjoe/threadmill#78 ·
メンテナーはふだん 1 日以内に返信
-
perf real
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
codingjoe/threadmill#74 ·
メンテナーはふだん 1 日以内に返信
codingjoe/threadmill の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
data-umbrella/du-event-board#225 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100