A late acknowledgement can overwrite the retry attempt that replaced it
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- lua, redis
- Bereich
- backend, distributed-systems
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 21
- Forks
- 2
- Ø Merge
- 12 Std. 38 Min.
- Gemergte PRs (30 T.)
- 27
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
MISP/misp-workbench#496 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
fossasia/visdom-dev#69 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug] Parameters named like a property break to_xcal()Evtl. vergeben @atharvasalunke1267 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
collective/icalendar#2018 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag