A late acknowledgement can overwrite the retry attempt that replaced it
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
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- lua, redis
- Domínio
- backend, distributed-systems
Direção de pesquisa
Start with threadmill/backends/lua/acknowledge.lua and read the README section describing retries that outlive their leases. Trace how a late acknowledgement interacts with the reaper's requeued attempt, then define done as preventing the stale result from replacing the current attempt or removing its running state; the issue leaves the fencing approach open.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Found while reviewing PR #69 with the SuperJoe crew (pre-existing, untouched by that patch), filed as out-of-scope there.
acknowledge.lua fences only on running-set membership: it ZREMs the id and proceeds only when the id was there. A worker whose lease expired but which is still running can acknowledge after the reaper requeued the task for a retry: the reaper's claim re-armed the running entry, so the late ack's ZREM succeeds. It then writes the stale result, deletes the task hash, and removes the new attempt's running entry — while the deferred entry the retry created survives and runs the task again.
The README already documents that a retry may execute concurrently with a task that outlived its lease, so duplicate execution is expected. What is not expected is the late ack publishing a result for the wrong attempt and destroying the retry's state.
Options:
- fence the ack on the attempt it was leased for, e.g. a per-attempt token written beside the lease and compared by the script, or
- let an ack lose to a renewed claim.
Reference: threadmill/backends/lua/acknowledge.lua.
- Linguagem predominante
- Python
- Estrelas
- 21
- Forks
- 2
- Merge médio
- 12h 38min
- PRs com merge (30d)
- 27
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.
Issues semelhantes
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
sergey-miryanov/gcmon#230 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Mantenedores costumam responder em até 1 dia
-
[BUG] Failed archive extraction deletes the dataset cacheTalvez já em andamento @dajiaohuang assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
alibaba/GraphScope#4674 ·