Terminal finalizes fail with unique conflict when a duplicate holds the claim

Aperta
#809 0 commenti 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
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, rust
Ambito
backend, databases

Direzione di ricerca

Start with awa/tests/snooze_unique_conflict_test.rs and the finalize paths for queue storage and canonical storage. Add reproductions for completion, exhausted retries or terminal failure, DLQ moves, and handler-returned cancellation on both engines. Each test should show that the attempt reaches a terminal state while the newer duplicate keeps the uniqueness claim.

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

Descrizione

Follow-up to #807 (fixed for snooze, retry-after and retryable-error backoff in #808).

A unique job whose states mask claims a terminal state (completed, failed, cancelled) but not running releases its claim while it runs, so an identical job can be enqueued and take the claim. When the first job then finalizes into a state its mask claims, the finalize must take the claim back, conflicts, and rolls back: the attempt stays running until stale-receipt rescue, as #807 described for snooze.

Affected finalizes, on both queue storage and canonical storage:

  • completion (completed in the mask);
  • retries exhausted and terminal failure (failed);
  • move to the DLQ (failed);
  • handler-returned cancel (cancelled).

#808 handles the deferred-successor case by recording the attempt as cancelled as a duplicate. These paths need an equivalent decision for each target state: for example, finalize with the uniqueness fields stripped, as rescue duplicate cancellation does, so the newer job keeps the claim and the attempt still reaches a terminal state. Each needs a reproduction in the style of awa/tests/snooze_unique_conflict_test.rs on both engines.

Lingua principale
Rust
Stelle
37
Fork
8
Merge medio
14h 16m
PR unite (30g)
244

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 hardbyte/awa

Tutte le issue di hardbyte/awa

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.