Bound the batch acquire count because --prefetch-count is unbounded
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- python, redis
- Área
- backend, distributed-systems
Línea de trabajo
Start with the --prefetch-count option, the worker's queue.Queue and acquire call, then trace RedisTaskBackend.acquire through acquire.lua and the README prefetching section. Confirm how the count reaches the queue and Redis script, and use the real redis-server reproduction described in the issue. Done requires a maintainer-selected ceiling to be consistently enforced and documented.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Deferred from the task-prefetching review (crew run) rather than fixed in that branch, because choosing a ceiling is a maintainer decision.
What
count is unbounded end to end:
--prefetch-countaccepts any int>= 1(the only validation is the lower bound), defaulting to4 × threads- it becomes
queue.Queue(maxsize=count)andacquire(..., count=count)in the worker RedisTaskBackend.acquireforwards it asARGV[8], andacquire.luapops up to that many tasks inside one atomicEVAL
Why it matters
- one worker can lock the entire backlog under a single lease, starving every other worker until the shared deadline expires, at which point the reaper records the whole batch FAILED with no retry
- process memory grows with the number of buffered payloads
- the single-threaded Redis server is blocked for work proportional to
countper call (oneZPOPMIN/HGET/cjson/ZADD/HSETpass per task, inside one script execution)
Reproduced against a real redis-server: one call with ARGV[8]=6 moved all six ready tasks to the running set with an identical deadline and one worker id, leaving the ready set empty.
Options
- cap the effective count at a documented maximum (or at a new dedicated backend option)
- clamp
prefetch_countto the queue's backlog bound, if one exists - derive the ceiling from
lease_ttland the expected worst-case task duration, so a buffer cannot outlive its lease
Related: the buffer dwell counts against lease_ttl (the reserve happens at fetch time), so an unbounded buffer also makes false lease expiries more likely. That ceiling is documented in the branch's README section on prefetching.
- Lenguaje dominante
- Python
- Estrellas
- 21
- Forks
- 2
- Merge medio
- 12 h 38 min
- PR fusionados (30 d)
- 27
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Issues similares
-
No test checks that scheduled workflows declare minimal permissions, concurrency and a timeoutAbiertoci enhancement testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area/config comp/tools P2 platform/telegram type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
NousResearch/hermes-agent#145412 ·
Los mantenedores suelen responder en 1 día
-
[oblt-aw][autodoc] Update docs for security org scaffolding and Docs AI menu permission changesPosiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
curriculum documentation quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
githubnext/gh-aw-workshop#5039 ·
Los mantenedores suelen responder en 1 día
-
Community project: hosted MOSS-Image studio with a visual JSON layout builder (no ComfyUI needed)Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 65/100
OpenMOSS/MOSS-Image#27 · 1 comentario ·
Los mantenedores suelen responder en 1 día