Repository navigation
Conversation
zoewangg
force-pushed
the
zoewang/crt-h2-stream-acquisition-timeout
branch
2 times, most recently
from
November 24, 2026 15:41
03b1eab to
7b03c19
Compare
jencymaryjoseph
approved these changes
Nov 25, 2026
| "type": "bugfix", | ||
| "category": "AWS CRT HTTP Client", | ||
| "contributor": "", | ||
| "description": "`AwsCrtAsyncHttpClient` now applies `connectionAcquisitionTimeout` to HTTP/2 requests waiting for a stream when all `maxConcurrency` streams are in use, or for a new connection, matching the Netty client. Previously these requests waited without a time limit. Requests that wait longer than the acquisition timeout (10 seconds by default) now fail with an `IOException`, like the HTTP/1.1 acquisition timeout. To allow longer waits, increase `maxConcurrency` or `connectionAcquisitionTimeout`." |
Contributor
There was a problem hiding this comment.
Looks like a duplicate change log, can we keep just one ?
Contributor
Author
There was a problem hiding this comment.
They are actually different. This one describes the behavior change and the other one describes the error message change.
On HTTP/2, map connectionAcquisitionTimeout to the stream manager's acquisition timeout, so a request waiting for a stream or a new connection fails after it, as on Netty. Set the connection manager's own acquisition timeout to 0 on HTTP/2 so the two timers cannot race. The timeout (2097) fails with an IllegalStateException whose message starts with the Netty client's acquire-timeout sentence, and is not retried. Requires an aws-crt release that includes aws-crt-java#1032.
Surface the HTTP/2 stream acquisition timeout (2097) as an IOException carrying the CRT error text, with the CRT error as the cause, matching the HTTP/1.1 acquisition timeout (2093), instead of an IllegalStateException.
Report the HTTP/1.1 connection acquisition timeout (2093) and the HTTP/2 stream acquisition timeout (2097) as an IOException whose message starts with Netty's acquire-timeout sentence, followed by advice naming the CRT options, with the CRT error as the cause.
Add optional per-client hooks to the long-running request suites that check the acquire-timeout failure's message prefix and cause type, and a shared HTTP/2 acquire-timeout suite that CRT and Netty run. Move DeferredResponseServer to http-client-tests and replace the CRT-only acquisition timeout tests with the shared suites.
zoewangg
force-pushed
the
zoewang/crt-h2-stream-acquisition-timeout
branch
from
November 25, 2026 23:40
2116ffe to
72275c0
Compare
zoewangg
enabled stacked auto-merge
November 25, 2026 23:42
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
connectionAcquisitionTimeoutis not honored inAwsCrtAsyncHttpClientHTTP/2 code path today. The new aws-crt-java release adds an HTTP/2 stream acquisition timeout, so the CRT client can applyconnectionAcquisitionTimeoutthe same way.Modifications
connectionAcquisitionTimeout(10 seconds by default) is passed toHttp2StreamManagerOptions.withStreamAcquisitionTimeoutInMilliseconds, so it bounds both the wait for a stream and the wait for a new connection. Existing HTTP/2 users whose requests wait longer than the timeout now get an error instead of waiting.Testing
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.AI tools
License