Releasing a pinned queue ring takes time proportional to the lane's backlog (#779 stage 3 pacing)
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
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- postgresql, rust
- Ambito
- backend, databases, performance
Direzione di ricerca
Start by reading the maintenance advance and queue prune behavior described in the issue, then inspect the existing test test_queue_ring_pin_busy_lane_is_left_to_its_claimers. Implement and measure the proposed time budget and independent pacing for reads, checking release time for 200k and 1M job lanes and claim latency while the advance runs. Done means large cleared lanes release faster without increasing prune lock pressure.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
After a pinning lane's jobs are moved or cancelled, the maintenance advance from #797 releases the queue ring at about 500 rows/s, so a large lane stays pinned long after the operator has cleared it. This body is the current state.
Observed (0.6.18 candidate, 839120ce)
A lane of 200,000 unclaimed jobs pinned the queue ring; the jobs were cancelled newest first.
- Nothing advanced while the cancel ran, as expected: the lane's oldest job is cancelled last.
- After the cancel finished,
awa.maintenance.prune.claim_cursor_advancesrecorded 50 advances, about one every 8 s, each moving 4,000 positions. - The pin cleared 405 s after the cancel finished. The ring then advanced about one generation per second and caught up by 1,403 generations; queue prune resumed.
- On 81b9211b (without #797) the same cancel left the ring on one generation for the whole run.
At this rate a 1M-job lane stays pinned for about half an hour after it is cleared.
Cause
Each leader read advances at most 32 lanes × 4 windows × 1,000 positions, and reads run after a queue prune that returns SkippedActive or on the refresh while prune is backed off. Prune's backoff resets only when an advanced lane leaves the oldest slot's pin, so it stays high for the whole time the advance is making progress, and the advance is paced by it.
Resetting prune's backoff after every advance would shorten this, but it makes prune retry its ACCESS EXCLUSIVE request every tick while the lane drains, which is the claim-versus-prune lock pressure behind #721. An existing test guards against that (test_queue_ring_pin_busy_lane_is_left_to_its_claimers: resetting on every read gave 22 prune attempts over 43 ticks).
Proposal (0.6.19 and main)
- Time-budget each read instead of a fixed window count. Keep running 1,000-position windows for a lane while each window moves a full window, up to a per-read budget (about 250–500 ms). Each window stays its own short transaction, so a claimer on that lane skips at most one poll per window and the lock footprint per transaction is unchanged.
- Pace the advance by its own progress, separately from prune's backoff. When a read uses its whole budget and the cursor moved, run the next read on the next maintenance tick. Stop early when a window moves nothing. Prune keeps its own backoff, which already resets when the lane leaves the pin.
- Measure release time for 200k and 1M-row lanes, before and after, and claim latency on the released lane while the advance runs.
Estimated, unmeasured: 10–20k positions per tick instead of 4,000 per 8 s, so a 1M-job lane releases in about a minute.
Rust only; no schema change. Related: #779, #797, #721.
- 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