Reaping uses one HGET and one ack or requeue round trip for each expired task
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
- 55/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- backend, distributed-systems, performance
Direzione di ricerca
Start in threadmill/backends/redis.py at RedisBroker._reap_task and the claimed_ids loop, then inspect reaper.lua and related issue #71 for decision correctness. Trace the maintenance pass and ensure expiry batches avoid per-task HGET and sequential acknowledge/requeue round trips while preserving the existing reaping behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found by the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb).
reaper.lua claims a whole batch in one call. Then RedisBroker._reap_task uses two more round trips for each claimed task. The first is an HGET for the stored payload. The second is an acknowledge or requeue script call. All calls run one after the other in the maintenance pass of the broker:
# threadmill/backends/redis.py
claimed_ids = self._reaper_script(...)
for claimed_id in claimed_ids:
...
self._reap_task(task_id)
The replaced Lua reaper settled the whole batch in one call. An expiry batch now costs O(batch) client round trips. It also blocks the mover and reaper pass for every queue behind it. Reaping is an exception path, so the impact is small. But the cost is unbounded in batch_size.
The claim script can return the stored data of each claimed task with its ID. HGET already uses the same Redis instance and the script is atomic. That change halves the round trips. The decision can also run for each queue in one batch. Related: #71 covers the correctness of the decision, not its cost.
- Lingua principale
- Python
- Stelle
- 19
- Fork
- 1
- Merge medio
- 14h 37m
- PR unite (30g)
- 22
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la 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 codingjoe/threadmill
-
Add worker pool telemetryForse di nuovo libera @codingjoe l’ha presa 101 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
codingjoe/threadmill#18 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codingjoe/threadmill
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
MystenLabs/MemWal#1163 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
infertopics leaves new nodes without a topic when untopiced neighbours outnumber topiced onesForse già presa @moneebullah25 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ClanGenOfficial/clangen#6254 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
FinanceFlash/unvibecode#218 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno