Skip to content

[PR #7615/42190f41 backport][3.109] Fix RedisWorker stalling when >20 tasks wait on same resource#7624

Closed
patchback[bot] wants to merge 1 commit into3.109from
patchback/backports/3.109/42190f416a70098b410591a884d6d21785da45e3/pr-7615
Closed

[PR #7615/42190f41 backport][3.109] Fix RedisWorker stalling when >20 tasks wait on same resource#7624
patchback[bot] wants to merge 1 commit into3.109from
patchback/backports/3.109/42190f416a70098b410591a884d6d21785da45e3/pr-7615

Conversation

@patchback
Copy link
Copy Markdown

@patchback patchback Bot commented Apr 22, 2026

This is a backport of PR #7615 as merged into main (42190f4).

Summary

  • When a user dispatches 21+ tasks for the same exclusive resource, fetch_task() now doubles its query limit and retries from the oldest task until a runnable task is found or the entire queue is examined
  • Previously, workers only looked at the 20 oldest tasks — if all were blocked on the same resource, tasks at position 21+ (which may use different resources) were never examined

closes: #7612

Test plan

  • Ran test_tasking.py functional tests in dev container — all tasking-relevant tests pass
  • Ran test_tasks.py (using_plugin) functional tests — all pass
  • Verify with 25+ tasks dispatched for the same repo + 1 task for a different repo: the different-repo task should be picked up promptly

🤖 Generated with Claude Code

Verifies that when 25+ tasks are blocked on the same resource,
a task using a different resource at position 27 still gets picked up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
(cherry picked from commit 42190f4)
@gerrod3 gerrod3 closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants