Fix an issue where we are not injecting more HTTP2 connections when we should #56062
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #55980
This is a regression caused by my connection pooling changes.
For HTTP2, we constrain our connection injection logic to never inject more than one connection at a time. On successful connection establishment, we should check if we need to create yet another connection to handle the queued requests. Unfortunately, we aren't doing this today.
The specific problem is a scenario like this:
(1) User submits one request. We enqueue it and kick off an HTTP2 connection attempt.
(2) User submits 100 more requests. There are now 101 requests in the queue.
(3) Connection attempt succeeds. We dequeue 100 requests and give them to the new connection to be processed.
(4) There's still one request in the queue, so we should be kicking off another connection attempt -- but currently we don't.