A stored payload that does not deserialize keeps the reaper in a loop
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend, distributed-systems
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 19
- Forks
- 1
- Merge medio
- 9 h 46 min
- PR fusionados (30 d)
- 17
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codingjoe/threadmill
-
bug real side quest
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
codingjoe/threadmill#78 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
perf real
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
codingjoe/threadmill#74 ·
Los mantenedores suelen responder en 1 día
-
bug real
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
codingjoe/threadmill#75 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug real
Dificultad 4/5 3-5 días Aptitud para principiantes 64/100
codingjoe/threadmill#71 ·
Los mantenedores suelen responder en 1 día
-
perf real
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
codingjoe/threadmill#67 ·
Los mantenedores suelen responder en 1 día
Todos los issues de codingjoe/threadmill
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Harmony OPeNDAP SubSetter (HOSS) Geographic LARC_CLOUD PREFIRE_SAT2_AUX-SAT R01 production
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nasa/harmony-autotester#245 ·
-
[FEATURE] - Add UTVD supportAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Deltares/imod-python#1928 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100