A late acknowledgement from an expired attempt can overwrite the retry attempt
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
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Domaine
- backend, distributed-systems
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 19
- Forks
- 1
- Merge moyen
- 14 h 39 min
- PR mergées (30 j)
- 21
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.
Autres issues de codingjoe/threadmill
-
Add worker pool telemetryPeut-être à nouveau libre @codingjoe l’a pris il y a 100 jours, et aucune pull request n’est ouverte. Ouverteenhancement
codingjoe/threadmill#18 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de codingjoe/threadmill
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Graphify-Labs/graphify#4241 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
-
DeviceTrackerOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
XiaoMi/ha_xiaomi_home#1821 ·
Les mainteneurs répondent en général sous 1 jour
-
Maven path-index: "Ambiguous or noncanonical artifact path" error does not report the offending pathOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
pulp/pulp_maven#524 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour