Heartbeat passes take time proportional to a runtime's open claims, and nothing reports how far behind they run
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
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- postgresql, rust
- Ambito
- backend, observability
Direzione di ricerca
Start by reading the heartbeat implementation and the existing awa.heartbeat.batches metric; the payload does not name their files or tests. Determine how heartbeat passes count refreshed claims and record duration, then add a warning when a pass exceeds a fraction of configured staleness. Done when the metric and warning expose pass duration and claim count; profiling and test-side staleness are tracked separately.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A runtime refreshes every claim it holds in each heartbeat pass, so a pass takes longer the more claims the runtime holds. Nothing reports how long a pass takes or how stale the runtime's oldest claim has become. If a pass runs longer than the time left before the staleness window closes, rescue treats claims of a live runtime as abandoned and their jobs run again. The first visible symptom is that duplicate execution.
Measured in bulk_rescue_test::rescue_drains_an_abandoned_backlog_without_rescuing_live_claims, instrumented by #832, on an idle 4-core machine with Postgres 17. One queue-storage runtime held 40,000 to 50,000 open claims with a 2.25 s heartbeat interval. Its oldest claim went up to 14.5 s without a heartbeat (p95 about 12 s), so one pass over that many claims takes roughly 12 s, about 4,000 claims per second. On loaded CI runners the same test exceeds its 18 s staleness and rescue takes 500 live claims; see the bulk rescue entry in #773.
With the defaults (30 s interval, 90 s staleness), a pass would need to take more than about 60 s before live claims are rescued. At the rate above, that is around 240,000 claims on one runtime when idle. This is an extrapolation from one machine, not a measurement, and contention on a busy database would lower it. Normal in-flight counts are bounded by worker concurrency and are far below this, so this is not a known production failure. But nothing warns before it happens, and a shorter staleness setting or a large prefetch narrows the margin.
Proposal:
- Record each heartbeat pass's duration and claim count as a metric, alongside the existing
awa.heartbeat.batchescounter. - Log a warning when a pass takes longer than a fraction of the configured staleness, for example half, naming the claim count. Operators then see the margin shrinking before any rescue.
- Separately, profile the pass to see whether its per-claim cost can come down, for example fewer and larger statements. Do that once the metric shows where the time goes.
The test's own staleness is a test-side problem: at 50,000 claims it can't be met even locally without the CI scaling. It is tracked in #773 and will be fixed in the test.
- 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
- 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 hardbyte/awa
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
0.6.19 release checklistApertaoperational
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
hardbyte/awa#861 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
hardbyte/awa#841 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hardbyte/awa
Issue simili
-
Mobile release verification reports missing build inputs with a custom Cargo target directoryApertabug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsotto/sotto-authenticator#139 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
registrystack/registry-stack#2924 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
foundry-rs/starknet-foundry#4733 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100