Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#73 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Stack tecnológico
lua, python, redis

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 unde­serializable 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

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.

Lenguaje dominante
Python
Estrellas
19
Forks
1
Merge medio
9 h 46 min
PR fusionados (30 d)
17

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codingjoe/threadmill

Todos los issues de codingjoe/threadmill

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.