Skip to content

Release job map lock before queue sends - #1117

Merged
cmackenzie1 merged 2 commits into
masterfrom
cole/fix-global-lock
Jul 29, 2026
Merged

Release job map lock before queue sends#1117
cmackenzie1 merged 2 commits into
masterfrom
cole/fix-global-lock

Conversation

@cmackenzie1

@cmackenzie1 cmackenzie1 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

A full state-machine queue caused controller RPC handlers to wait while holding the global job map mutex. One stalled job could therefore prevent messages from reaching every other job.

Clone the selected job's sender under the map lock, then release the lock before waiting for channel capacity. This preserves per-job backpressure without making it controller-wide.


Open in Devin Review

@cmackenzie1
cmackenzie1 requested a review from mwylde July 29, 2026 18:03
@cmackenzie1 cmackenzie1 self-assigned this Jul 29, 2026
@cmackenzie1

Copy link
Copy Markdown
Collaborator Author

Cherry picked from #1115

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

A full state-machine queue caused controller RPC handlers to wait while
holding the global job map mutex. One stalled job could therefore prevent
messages from reaching every other job.

Clone the selected job's sender under the map lock, then release the lock
before waiting for channel capacity. This preserves per-job backpressure
without making it controller-wide.
@cmackenzie1
cmackenzie1 force-pushed the cole/fix-global-lock branch from 04793db to c67bd91 Compare July 29, 2026 20:13
@cmackenzie1
cmackenzie1 enabled auto-merge (squash) July 29, 2026 20:25
@cmackenzie1
cmackenzie1 merged commit 078def1 into master Jul 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants