A late acknowledgement can overwrite the retry attempt that replaced it
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- lua, redis
- Domaine
- backend, distributed-systems
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 21
- Forks
- 2
- Merge moyen
- 12 h 38 min
- PR mergées (30 j)
- 27
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Issues similaires
-
Validate non-divisible effective batch sizes in the Unsloth LoRA backendPeut-être pris @debesh-biswas l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
`rx.Model` event arguments emit `PydanticDeprecatedSince20` once per payload keyPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
reflex-dev/reflex#7634 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
documentation
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
topoteretes/cognee#6239 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ranaroussi/yfinance#3009 ·
Les mainteneurs répondent en général sous 1 jour
-
Test discovery aborts on GPU builds without cuStateVec: check_cuStateVec expects a failed result but set_config() now raises RuntimeErrorPeut-être pris @dmeliksetian l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Qiskit/qiskit-aer#2495 ·
Les mainteneurs répondent en général sous 1 jour