Skip to content

Commit 4c25e47

Browse files
authored
Pass maxConcurrency to CRT (#3742)
1 parent 8db0b7c commit 4c25e47

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "bugfix",
3+
"category": "AWS CRT-based S3 Client",
4+
"contributor": "",
5+
"description": "Fix an issue where maxConcurrency configured by the user on the builder was not honored."
6+
}

services/s3/src/main/java/software/amazon/awssdk/services/s3/S3CrtAsyncClientBuilder.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,15 @@ public interface S3CrtAsyncClientBuilder extends SdkBuilder<S3CrtAsyncClientBuil
8888
*
8989
* <p>
9090
* Whether the transfer manager can achieve the configured target throughput depends on various factors such as the network
91-
* bandwidth of the environment and the configured {@link #maxConcurrency}.
91+
* bandwidth of the environment and whether {@link #maxConcurrency} is configured.
9292
*
9393
* <p>
94-
* By default, it is 10 Gbps. If users want to transfer as fast as possible, it's recommended to set it to the maximum network
95-
* bandwidth on the host that the application is running on. For EC2 instances, you can find network bandwidth for a specific
94+
* By default, it is 10 gigabits per second. If users want to transfer as fast as possible, it's recommended to set it to the
95+
* maximum network bandwidth on the host that the application is running on. For EC2 instances, you can find network
96+
* bandwidth for a specific
9697
* instance type in <a href="https://aws.amazon.com/ec2/instance-types/">Amazon EC2 instance type page</a>.
98+
* If you are running into out of file descriptors error, consider using {@link #maxConcurrency(Integer)} to limit the
99+
* number of connections.
97100
*
98101
* @param targetThroughputInGbps the target throughput in Gbps
99102
* @return this builder for method chaining.

services/s3/src/main/java/software/amazon/awssdk/services/s3/internal/crt/S3CrtAsyncHttpClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ private S3CrtAsyncHttpClient(Builder builder) {
7070
.withClientBootstrap(s3NativeClientConfiguration.clientBootstrap())
7171
.withPartSize(s3NativeClientConfiguration.partSizeBytes())
7272
.withComputeContentMd5(false)
73+
.withMaxConnections(s3NativeClientConfiguration.maxConcurrency())
7374
.withThroughputTargetGbps(s3NativeClientConfiguration.targetThroughputInGbps())
7475
.withInitialReadWindowSize(initialWindowSize)
7576
.withReadBackpressureEnabled(true);

0 commit comments

Comments
 (0)