Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

world-postgres: job attempt cap equals core's max-deliveries delivery, so a post-ceiling retry strands the run

Chiusa Adatta ai principianti
#4,427 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à
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
postgresql, typescript

Direzione di ricerca

Inizia in packages/world-postgres/src/queue.ts intorno alla riga 140, dove main configura Graphile jobs con MAX_GRAPHILE_JOB_ATTEMPTS. Esamina il comportamento riservato a main descritto per delivery 49 e la gestione dei tentativi intorno a MAX_DELIVERIES_EXCEEDED. Il lavoro è completato quando un errore transitorio dopo il superamento del limite può essere consegnato nuovamente senza bloccare l'esecuzione, mentre il comportamento stabile rimane invariato.

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

Descrizione

What happens

Once a workflow message goes past MAX_QUEUE_DELIVERIES (48), core stops doing real work and makes a single attempt to write run_failed (MAX_DELIVERIES_EXCEEDED). With #4421 (main) and #4422 (stable), a transient failure of that write (429, 5xx, TRANSPORT/TIMEOUT) throws instead of acking. The queue is expected to redeliver, and the redelivery retries only the terminal write.

world-postgres gives that throw nowhere to go. Every Graphile job is added with maxAttempts: MAX_GRAPHILE_JOB_ATTEMPTS = 49:

// packages/world-postgres/src/queue.ts:140
// Core records MAX_DELIVERIES_EXCEEDED on delivery 49.
const MAX_GRAPHILE_JOB_ATTEMPTS = 49;

Delivery 49 is the first post-ceiling delivery, and it is also the job's last attempt. If the handler throws there, fail_job leaves attempts = max_attempts, so is_available is false forever. The job is retired and the run stays running, which is the same end state the core fix set out to remove. On world-vercel the same throw is redelivered: VQS has no delivery cap, and it leaves about 14 h of the 24 h message TTL for retries. world-local allows 256 deliveries.

Expected

The world-postgres job should keep a few attempts past core's ceiling, so the post-ceiling redelivery can actually happen.

Notes

  • Graphile's retry backoff is exp(least(attempts, 10)) seconds ([email protected] failJob). From attempt 10 onward each retry waits about 6.1 h, so extra attempts cost nothing in steady state and cannot hot-loop.
  • The extra budget also leaves some slack for the lost-worker attempts described in #3992. It does not fix that issue: attempts are still spent on claim.
  • On stable, jobs use maxAttempts: 3 (#3994), so the core ceiling is never reached there. This issue is about main only.

Found while investigating #4421 / #4422.

Lingua principale
TypeScript
Stelle
2.5k
Fork
385
Merge medio
23h 29m
PR unite (30g)
162

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 vercel/workflow

Tutte le issue di vercel/workflow

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.