Queue storage: terminal prune leaves unique claims behind

Aperta
#828 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, rust
Ambito
backend, databases

Direzione di ricerca

Read ADR-045 and the changes in #801, then trace the terminal prune path and how unique claims are stored and released. Check the documentation for the promise around uniqueness in completed jobs, and investigate how pruning partitions could release claims without adding waits. Done means the behavior and cleanup path are decided, including whether existing orphaned claims need an operator remedy.

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

Descrizione

A job whose unique_states include completed or failed keeps its unique key claimed while it sits in that terminal state. When terminal prune removes the row, it does not release the claim, so the key stays claimed with no job behind it, and a later job with that key is refused as a duplicate.

#801 fixes the same leak for DLQ purge, purge_dlq_job, cleanup_dlq and DLQ retention cleanup, which now release the claim in the same transaction. Terminal prune is not covered.

Found while ordering unique-claim changes by key for #799 / #825. Not changed there.

To investigate:

  • whether "unique while completed" should mean until the row is pruned or permanently, and what the docs promise;
  • the prune path's cost if it must release claims: prune drops whole partitions, so a release would need a key lookup before the drop, and must not add waits to prune (ADR-045);
  • whether existing databases hold orphaned claims, and how an operator finds and clears them.
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.