world-postgres: job attempt cap equals core's max-deliveries delivery, so a post-ceiling retry strands the run
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
- Ambito
- backend, databases, distributed-systems
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 usemaxAttempts: 3(#3994), so the core ceiling is never reached there. This issue is aboutmainonly.
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vercel/workflow
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Feature: Expose isLastAttempt/maxAttempts in step metadataForse già presa @joelfickson l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
vercel/workflow#4979 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
WorkflowServerReadableStream leaks the connection when cancelled before streams.get() resolvesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vercel/workflow#4644 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
world-vercel waitForTerminalStatus drops the abort signal on its fallback readForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
vercel/workflow#4643 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vercel/workflow
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
grafana/profiles-drilldown#1212 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
grafana/traces-drilldown#980 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openremote/openremote#3487 · 1 commento ·
-
triage:needs-human
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
garrytan/gbrain#7635 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
coollabsio/jean#867 ·
I maintainer di solito rispondono entro 1 giorno