Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

A stored payload that does not deserialize keeps the reaper in a loop

Offen
#73 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
lua, python, redis

Rechercherichtung

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 unde­serializable task is finalized as FAILED, publishes a result, and is not re-claimed indefinitely.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug real

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_TTL and the same error occurs.
  • The task never reaches FAILED and 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.

Vorherrschende Sprache
Python
Sterne
19
Forks
1
Ø Merge
9 Std. 46 Min.
Gemergte PRs (30 T.)
17

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codingjoe/threadmill

Alle Issues in codingjoe/threadmill

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.