Skip to content

Various code clean up on async code #1065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2019
Merged

Conversation

zoewangg
Copy link
Contributor

@zoewangg zoewangg commented Feb 6, 2019

Description

  • Fanout Http2SettingsFrameHandler
  • Add tests
  • Update javadocs

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 install succeeds
  • 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 read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • 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

@zoewangg zoewangg force-pushed the zoewang-asyncCodeCleanup branch from 1a74d09 to 3413a6c Compare February 7, 2019 00:01
@@ -87,7 +87,7 @@
NettyNioAsyncHttpClient(DefaultBuilder builder, AttributeMap serviceDefaultsMap) {
this.configuration = new NettyConfiguration(serviceDefaultsMap);
this.protocol = serviceDefaultsMap.get(SdkHttpConfigurationOption.PROTOCOL);
this.maxStreams = builder.maxHttp2Streams == null ? Integer.MAX_VALUE : builder.maxHttp2Streams;
this.maxStreams = builder.maxHttp2Streams == null ? Long.MAX_VALUE : builder.maxHttp2Streams;
Copy link
Contributor

@dagnir dagnir Feb 7, 2019

Choose a reason for hiding this comment

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

Is this intended to the max value for this setting? If so, we should probably be setting to 2^32 - 1 since the spec defines option values as unsigned 32-bit values: https://httpwg.org/specs/rfc7540.html#SettingFormat

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. Will use 2^32 - 1
Yeah, it will use the min value of serverMaxStreams and clientMaxStreams.

channel.attr(MAX_CONCURRENT_STREAMS).set(Math.min(clientMaxStreams, serverMaxStreams));

@codecov-io
Copy link

codecov-io commented Feb 7, 2019

Codecov Report

Merging #1065 into master will increase coverage by 0.05%.
The diff coverage is 77.77%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1065      +/-   ##
============================================
+ Coverage     56.11%   56.16%   +0.05%     
- Complexity     4660     4662       +2     
============================================
  Files           819      819              
  Lines         27917    27920       +3     
  Branches       2252     2252              
============================================
+ Hits          15665    15681      +16     
+ Misses        11528    11511      -17     
- Partials        724      728       +4
Impacted Files Coverage Δ Complexity Δ
...k/http/nio/netty/internal/FutureCancelHandler.java 94.11% <ø> (ø) 6 <0> (ø) ⬇️
...mazon/awssdk/http/nio/netty/SdkEventLoopGroup.java 86.66% <ø> (ø) 9 <0> (ø) ⬇️
...nio/netty/internal/ChannelPipelineInitializer.java 68.57% <0%> (+24.12%) 6 <0> (ø) ⬇️
...awssdk/http/nio/netty/NettyNioAsyncHttpClient.java 66.92% <50%> (ø) 18 <1> (ø) ⬇️
...etty/internal/http2/Http2SettingsFrameHandler.java 83.33% <83.33%> (ø) 6 <6> (?)
...wssdk/http/nio/netty/internal/ResponseHandler.java 62.83% <0%> (-0.1%) 13% <0%> (ø)
...p/nio/netty/internal/LastHttpContentSwallower.java

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a19cce...ebd2d1e. Read the comment docs.

Copy link
Contributor

@dagnir dagnir left a comment

Choose a reason for hiding this comment

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

:shipit:

@zoewangg zoewangg force-pushed the zoewang-asyncCodeCleanup branch from b7f4a17 to ebd2d1e Compare February 7, 2019 01:06
@zoewangg zoewangg merged commit b4b9083 into master Feb 7, 2019
@zoewangg zoewangg deleted the zoewang-asyncCodeCleanup branch February 7, 2019 01:32
aws-sdk-java-automation pushed a commit that referenced this pull request Dec 2, 2020
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.

3 participants