A stored payload that does not deserialize keeps the reaper in a loop
Les mainteneurs répondent en général sous 1 jour
Une pull request liée a déjà été fusionnée.
- #90 par @codingjoe — fusionnée
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 55/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Domaine
- backend, distributed-systems
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 19
- Forks
- 1
- Merge moyen
- 14 h 37 min
- PR mergées (30 j)
- 22
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de codingjoe/threadmill
-
Add worker pool telemetryPeut-être à nouveau libre @codingjoe l’a pris il y a 100 jours, et aucune pull request n’est ouverte. Ouverteenhancement
codingjoe/threadmill#18 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de codingjoe/threadmill
Issues similaires
-
Broken link in index.rstOuvertedocumentation
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
ansys/pydpf-core#3547 ·
Les mainteneurs répondent en général sous 1 jour
-
core
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
vectorize-io/hindsight#5457 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recordingPeut-être pris @ktz03 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
volcengine/OpenViking#5806 ·
Les mainteneurs répondent en général sous 1 jour
-
HTML: <template> content is extracted as document textPeut-être pris @ryanmeowy l’a pris aujourd’hui. Ouvertebug html
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
docling-project/docling#4714 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
APIv2 event data accepts a non-string reply and a NaN upper_boundPeut-être pris @awss1i l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
freedomofpress/securedrop#7946 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours