A stored payload that does not deserialize keeps the reaper in a loop
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Domínio
- backend, distributed-systems
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 19
- Forks
- 1
- Merge médio
- 2h 31min
- PRs com merge (30d)
- 16
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codingjoe/threadmill
-
bloat side quest yeet
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
codingjoe/threadmill#79 ·
Mantenedores costumam responder em até 1 dia
-
bloat duh side quest
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
codingjoe/threadmill#81 ·
Mantenedores costumam responder em até 1 dia
-
side quest test yeet
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 92/100
codingjoe/threadmill#72 ·
Mantenedores costumam responder em até 1 dia
-
bug real side quest
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
codingjoe/threadmill#78 ·
Mantenedores costumam responder em até 1 dia
-
perf real
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
codingjoe/threadmill#74 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de codingjoe/threadmill
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 3 dias
-
Negation with "not" and "no" is ignored during sentiment analysisTalvez já em andamento @vivek-3728 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
techcsispit/mess-mood#11 · 1 comentário ·
-
changelog investigate
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ramnes/notion-sdk-py#408 ·
-
good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
btclib-org/btclib-wallet#267 ·
Mantenedores costumam responder em até 1 dia
-
good first issue tech-debt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
knnmelprop/YAADO#111 ·