Skip to content

Set maxConcurrentStreams on HTTP/2 stream manager so that the MAX_CON…#6812

Merged
zoewangg merged 2 commits intofeature/master/crtH2from
zoewang/useMaxStreams
Mar 24, 2026
Merged

Set maxConcurrentStreams on HTTP/2 stream manager so that the MAX_CON…#6812
zoewangg merged 2 commits intofeature/master/crtH2from
zoewang/useMaxStreams

Conversation

@zoewangg
Copy link
Contributor

Motivation and Context

Follow-up improvements to the CRT HTTP/2 support:

  • Improve confusing error message when HTTP/2 is configured with the sync CRT client
  • Use CRT.awsIsTransientError() instead of deprecated HttpClientConnection.isErrorRetryable()
  • Set maxConcurrentStreams on Http2StreamManagerOptions so the MAX_CONNECTIONS setting is respected for HTTP/
  • Bump aws-crt-java to 0.43.9
  • Fix RST_STREAM test expectation — RST_STREAM errors are not retryable and should not be wrapped in `IOException

Modifications

  • AwsCrtHttpClient: Improved error message to clarify both options: use HTTP/1.1 (the default) or switch to a
    async HTTP client
  • AwsCrtHttpClientBase: Renamed maxConnectionsPerEndpoint to maxStreamsPerEndpoint for clarity. Set
    maxConcurrentStreams on Http2StreamManagerOptions so MAX_CONNECTIONS is honored for HTTP/2
  • CrtUtils: Replaced HttpClientConnection.isErrorRetryable() with CRT.awsIsTransientError(). Removed
    resolved TODO comments
  • H2ErrorTest: Fixed serverSendsRstStream test — RST_STREAM is not retryable, so the exception should be
    HttpException, not IOException
  • pom.xml: Bumped aws-crt-java from 0.43.5 to 0.43.9

Testing

  • Updated existing H2ErrorTest assertion

  • Existing unit and integration tests pass

  • Added unit tests

  • Ran existing tests

  • Manual testing performed

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn clean install -pl :aws-crt-client succeeds for affected modules
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry
  • My change is to implement 1.11 parity feature and I have updated
    LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

…NECTIONS setting is respected for HTTP/2. Also improved the error message when HTTP/2 is configured with the sync client to clarify available options.
@zoewangg zoewangg requested a review from a team as a code owner March 24, 2026 01:32
Copy link

@TingDaoK TingDaoK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
65.0% Coverage on New Code (required ≥ 80%)
4.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

…dk/http/crt/AwsCrtHttpClientBase.java

Co-authored-by: Dengke Tang <815825145@qq.com>
@zoewangg zoewangg merged commit 26a49d4 into feature/master/crtH2 Mar 24, 2026
14 of 30 checks passed
@zoewangg zoewangg deleted the zoewang/useMaxStreams branch March 24, 2026 21:09
@github-actions
Copy link

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants