Skip to content

grpc-js: Remove calls from the pick queue immediately when they end - #3078

Merged
murgatroid99 merged 2 commits into
grpc:@grpc/grpc-js@1.14.xfrom
murgatroid99:grpc-js_pick_queue_fast_remove
Sep 11, 2026
Merged

grpc-js: Remove calls from the pick queue immediately when they end#3078
murgatroid99 merged 2 commits into
grpc:@grpc/grpc-js@1.14.xfrom
murgatroid99:grpc-js_pick_queue_fast_remove

Conversation

@murgatroid99

Copy link
Copy Markdown
Member

This is a defense-in-depth fix for the bug reported in #2785 (comment). If, due to another bug, a channel gets stuck in a non-READY state for a long period of time, call references can accumulate in the pick queue, and they aren't removed immediately if they end locally due to cancellation or a deadline. With this change, calls are always immediately removed from the queue when they end.

Also, as suggested in that comment, I made the pick queue a set to make that removal efficient.

Comment thread packages/grpc-js/src/internal-channel.ts Outdated
Co-authored-by: Sergey Melikyan <55602957+Sermelyan@users.noreply.github.com>
@murgatroid99
murgatroid99 merged commit 72a2e87 into grpc:@grpc/grpc-js@1.14.x Sep 11, 2026
3 of 5 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