Skip to content

fix(athena): outbound rpc stuck behind low prio queue timeout#38160

Open
stefpi wants to merge 4 commits into
masterfrom
athena-send-queue
Open

fix(athena): outbound rpc stuck behind low prio queue timeout#38160
stefpi wants to merge 4 commits into
masterfrom
athena-send-queue

Conversation

@stefpi

@stefpi stefpi commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Using 2 seperate high and low queues creates a hidden bug in ws_send. When the high priority send queue is empty, ws_send runs data = low_priority_send_queue.get(timeout=1). When low priority queue is also empty, a new message in the high priority queue doesn't cancel the get() because its a different queue, and we are forced to wait until the 1 second timeout expires before the high priority queue gets and sends its message in the websocket.

We can fix this by using a PriorityQueue instead which will still properly send high priority messages first, but will also unblock instantly when there are no messages and a high priority message is added to the queue.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Process replay diff report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

✅ 0 changed, 66 passed, 0 errors

@stefpi stefpi marked this pull request as ready for review June 10, 2026 01:44
@stefpi stefpi changed the title fix: outbound rpc stuck behind low prio queue timeout fix(athena): outbound rpc stuck behind low prio queue timeout Jun 10, 2026
@stefpi stefpi force-pushed the athena-send-queue branch from 835d1b0 to 841d194 Compare June 10, 2026 01:53
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.

1 participant