Bound the batch acquire count because --prefetch-count is unbounded
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python, redis
- Lĩnh vực
- backend, distributed-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 21
- Fork
- 2
- Merge trung bình
- 12 giờ 38 phút
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
area/config comp/tools P2 platform/telegram type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
NousResearch/hermes-agent#145412 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[oblt-aw][autodoc] Update docs for security org scaffolding and Docs AI menu permission changesCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Community project: hosted MOSS-Image studio with a visual JSON layout builder (no ComfyUI needed)Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 65/100
OpenMOSS/MOSS-Image#27 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
deepspeedai/DeepSpeed#8925 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
external integration integration-submission
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
langchain-ai/docs#7077 ·
Maintainer thường phản hồi trong vòng 1 ngày