Reaping uses one HGET and one ack or requeue round trip for each expired task
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- backend, distributed-systems, performance
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 19
- Forks
- 1
- Ø Merge
- 14 Std. 39 Min.
- Gemergte PRs (30 T.)
- 21
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codingjoe/threadmill
-
Add worker pool telemetryEvtl. wieder frei @codingjoe hat das vor 100 Tagen übernommen, und es ist kein Pull Request offen. Offenenhancement
codingjoe/threadmill#18 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codingjoe/threadmill
Ähnliche Issues
-
first
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
AcademySoftwareFoundation/rmtc#54 · 1 Kommentar ·
-
feature/cohorts feature/feature-flags team/feature-flags
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
License examples/ as MITEvtl. vergeben @PGrayCS hat das heute übernommen. Offendocumentation enhancement example good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
speedyk-005/yasbd-lib#383 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
interactions-py/interactions.py#1827 ·
-
Managed start can fail when OpenVMM reads its control capability before NVX writes itEvtl. vergeben @ppenna hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag