Skip to content

Use the unbounded queue always and track seperate counter - #91

Merged
Stephen Belanger (Qard) merged 2 commits into
mainfrom
use-lazy-alloc-queue-with-seperate-counter
Aug 4, 2026
Merged

Stephen Belanger (Qard) merged 2 commits into
mainfrom
use-lazy-alloc-queue-with-seperate-counter

Conversation

@erin2722

@erin2722 Erin McNulty (erin2722) commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

It turns out that the crossbeam bounded queue pre-allocates the entire buffer upon initialization. When we switched to use the bounded queue, gateway containers started to OOM due to the memory of the pre-allocated buffers.

This PR switches the queue to always use an unbounded channel, and separately track the queue length for rejection/acceptance.

No behavior change is expected, and so the existing tests cover this behavior.

@Qard
Stephen Belanger (Qard) merged commit ab0e3e2 into main Aug 4, 2026
2 checks passed
@Qard
Stephen Belanger (Qard) deleted the use-lazy-alloc-queue-with-seperate-counter branch August 4, 2026 10:55
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