Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

A late acknowledgement from an expired attempt can overwrite the retry attempt

Aperta
#75 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
lua, python, redis

Direzione di ricerca

Start with acknowledge.lua, then trace the lease-expiry retry flow and the worker_ids data mentioned in the issue. Reproduce the sequence where an expired attempt is requeued and a newer attempt reacquires the task. Done means a late acknowledgement from the old attempt cannot remove, publish for, or delete state belonging to the newer attempt.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug real

Found by the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb).

acknowledge.lua identifies an in-flight attempt only by its membership in the running set:

local removed = redis.call('ZREM', KEYS[1], ARGV[1])
if removed == 0 then
  return 0  -- Task already reaped, skip
end

The reaper requeues a task after its lease expires. A second attempt then acquires the same task ID and the entry exists again. A late acknowledgement from the original attempt finds the entry and wins. It does three things:

  • It removes the running entry of the second attempt.
  • It publishes the result of the first attempt.
  • It removes the task hash (DEL KEYS[3]) that the second attempt still uses.

The second attempt continues to run with its state removed. When it finishes, its acknowledgement is a no operation and the backend discards its result. worker_ids already records which worker holds which attempt. Fencing on the acquiring worker or on an attempt token can correct this.

This error is not the same as the claim race in #71. #71 guards the decision of the broker. This error is the acknowledgement of the worker that arrives after a requeue.

Lingua principale
Python
Stelle
19
Fork
1
Merge medio
9h 46m
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codingjoe/threadmill

Tutte le issue di codingjoe/threadmill

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.