Reaping uses one HGET and one ack or requeue round trip for each expired task
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Domínio
- backend, distributed-systems, performance
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 19
- Forks
- 1
- Merge médio
- 14h 37min
- PRs com merge (30d)
- 22
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codingjoe/threadmill
-
Add worker pool telemetryTalvez livre de novo @codingjoe assumiu há 100 dias e não há nenhum pull request aberto. Abertaenhancement
codingjoe/threadmill#18 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de codingjoe/threadmill
Issues semelhantes
-
docs(types): update the collection binding note now that typed collections shipped in pycubrid 1.9.0Abertadocumentation priority: low size: S
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
cubrid-lab/sqlalchemy-cubrid#768 ·
Mantenedores costumam responder em até 1 dia
-
bug help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
Broken link in index.rstAbertadocumentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
ansys/pydpf-core#3547 ·
Mantenedores costumam responder em até 1 dia
-
core
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
vectorize-io/hindsight#5457 ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recordingTalvez já em andamento @ktz03 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
volcengine/OpenViking#5806 ·
Mantenedores costumam responder em até 1 dia