Skip to content

Commit 7ba3cf0

Browse files
Merge pull request #748 from aws/staging/f82f336e-daf3-4f40-aa3e-4111437eea96
Pull request: release <- staging/f82f336e-daf3-4f40-aa3e-4111437eea96
2 parents 3020997 + 60f52dd commit 7ba3cf0

File tree

276 files changed

+925
-286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+925
-286
lines changed

.changes/2.10.78.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "2.10.78",
3+
"date": "2020-03-03",
4+
"entries": [
5+
{
6+
"type": "bugfix",
7+
"category": "Netty NIO HTTP Client",
8+
"description": "Fix an issue where the Netty client was prematurely considering an HTTP/2 request body as sent, but was still in the process of being transferred to the remote endpoint."
9+
},
10+
{
11+
"type": "feature",
12+
"category": "Amazon Elastic Compute Cloud",
13+
"description": "Amazon VPC Flow Logs adds support for tags and tagging on resource creation."
14+
}
15+
]
16+
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# __2.10.78__ __2020-03-03__
2+
## __Amazon Elastic Compute Cloud__
3+
- ### Features
4+
- Amazon VPC Flow Logs adds support for tags and tagging on resource creation.
5+
6+
## __Netty NIO HTTP Client__
7+
- ### Bugfixes
8+
- Fix an issue where the Netty client was prematurely considering an HTTP/2 request body as sent, but was still in the process of being transferred to the remote endpoint.
9+
110
# __2.10.77__ __2020-03-02__
211
## __AWS Comprehend Medical__
312
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To automatically manage module versions (currently all modules have the same ver
4848
<dependency>
4949
<groupId>software.amazon.awssdk</groupId>
5050
<artifactId>bom</artifactId>
51-
<version>2.10.77</version>
51+
<version>2.10.78</version>
5252
<type>pom</type>
5353
<scope>import</scope>
5454
</dependency>
@@ -82,12 +82,12 @@ Alternatively you can add dependencies for the specific services you use only:
8282
<dependency>
8383
<groupId>software.amazon.awssdk</groupId>
8484
<artifactId>ec2</artifactId>
85-
<version>2.10.77</version>
85+
<version>2.10.78</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>software.amazon.awssdk</groupId>
8989
<artifactId>s3</artifactId>
90-
<version>2.10.77</version>
90+
<version>2.10.78</version>
9191
</dependency>
9292
```
9393

@@ -99,7 +99,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
9999
<dependency>
100100
<groupId>software.amazon.awssdk</groupId>
101101
<artifactId>aws-sdk-java</artifactId>
102-
<version>2.10.77</version>
102+
<version>2.10.78</version>
103103
</dependency>
104104
```
105105

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>software.amazon.awssdk</groupId>
2121
<artifactId>aws-sdk-java-pom</artifactId>
22-
<version>2.10.77</version>
22+
<version>2.10.78</version>
2323
<relativePath>../pom.xml</relativePath>
2424
</parent>
2525
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>software.amazon.awssdk</groupId>
2121
<artifactId>aws-sdk-java-pom</artifactId>
22-
<version>2.10.77</version>
22+
<version>2.10.78</version>
2323
<relativePath>../pom.xml</relativePath>
2424
</parent>
2525
<artifactId>bom</artifactId>

bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.10.77</version>
24+
<version>2.10.78</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.10.77</version>
25+
<version>2.10.78</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.10.77</version>
24+
<version>2.10.78</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.10.77</version>
25+
<version>2.10.78</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.10.77</version>
24+
<version>2.10.78</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

core/annotations/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>core</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/arns/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>core</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/auth/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>core</artifactId>
25-
<version>2.10.77</version>
25+
<version>2.10.78</version>
2626
</parent>
2727

2828
<artifactId>auth</artifactId>

core/aws-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>core</artifactId>
25-
<version>2.10.77</version>
25+
<version>2.10.78</version>
2626
</parent>
2727

2828
<artifactId>aws-core</artifactId>

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<artifactId>aws-sdk-java-pom</artifactId>
2323
<groupId>software.amazon.awssdk</groupId>
24-
<version>2.10.77</version>
24+
<version>2.10.78</version>
2525
</parent>
2626

2727
<artifactId>core</artifactId>

core/profiles/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>core</artifactId>
25-
<version>2.10.77</version>
25+
<version>2.10.78</version>
2626
</parent>
2727

2828
<artifactId>profiles</artifactId>

core/protocols/aws-cbor-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-ion-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-json-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-query-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-xml-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>core</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/protocol-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.77</version>
23+
<version>2.10.78</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/regions/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>core</artifactId>
25-
<version>2.10.77</version>
25+
<version>2.10.78</version>
2626
</parent>
2727

2828
<artifactId>regions</artifactId>

core/sdk-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>core</artifactId>
24-
<version>2.10.77</version>
24+
<version>2.10.78</version>
2525
</parent>
2626
<artifactId>sdk-core</artifactId>
2727
<name>AWS Java SDK :: SDK Core</name>

core/sdk-core/src/main/java/software/amazon/awssdk/core/retry/backoff/BackoffStrategy.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
@FunctionalInterface
2525
public interface BackoffStrategy {
2626

27+
/**
28+
* Max permitted retry times. To prevent exponentialDelay from overflow, there must be 2 ^ retriesAttempted
29+
* <= 2 ^ 31 - 1, which means retriesAttempted <= 30, so that is the ceil for retriesAttempted.
30+
*/
31+
int RETRIES_ATTEMPTED_CEILING = (int) Math.floor(Math.log(Integer.MAX_VALUE) / Math.log(2));
32+
2733
/**
2834
* Compute the delay before the next retry request. This strategy is only consulted when there will be a next retry.
2935
*
@@ -33,7 +39,8 @@ public interface BackoffStrategy {
3339
Duration computeDelayBeforeNextRetry(RetryPolicyContext context);
3440

3541
default int calculateExponentialDelay(int retriesAttempted, Duration baseDelay, Duration maxBackoffTime) {
36-
return (int) Math.min((1L << retriesAttempted) * baseDelay.toMillis(), maxBackoffTime.toMillis());
42+
int cappedRetries = Math.min(retriesAttempted, RETRIES_ATTEMPTED_CEILING);
43+
return (int) Math.min(baseDelay.multipliedBy(1L << cappedRetries).toMillis(), maxBackoffTime.toMillis());
3744
}
3845

3946
static BackoffStrategy defaultStrategy() {

core/sdk-core/src/main/java/software/amazon/awssdk/core/retry/backoff/EqualJitterBackoffStrategy.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
package software.amazon.awssdk.core.retry.backoff;
1717

18+
import static software.amazon.awssdk.utils.NumericUtils.min;
1819
import static software.amazon.awssdk.utils.Validate.isNotNegative;
1920

2021
import java.time.Duration;
@@ -44,13 +45,21 @@ public final class EqualJitterBackoffStrategy implements BackoffStrategy,
4445
ToCopyableBuilder<EqualJitterBackoffStrategy.Builder,
4546
EqualJitterBackoffStrategy> {
4647

48+
private static final Duration BASE_DELAY_CEILING = Duration.ofMillis(Integer.MAX_VALUE); // Around 24 days
49+
private static final Duration MAX_BACKOFF_CEILING = Duration.ofMillis(Integer.MAX_VALUE); // Around 24 days
50+
4751
private final Duration baseDelay;
4852
private final Duration maxBackoffTime;
49-
private final Random random = new Random();
53+
private final Random random;
5054

5155
private EqualJitterBackoffStrategy(BuilderImpl builder) {
52-
this.baseDelay = isNotNegative(builder.baseDelay, "baseDelay");
53-
this.maxBackoffTime = isNotNegative(builder.maxBackoffTime, "maxBackoffTime");
56+
this(builder.baseDelay, builder.maxBackoffTime, new Random());
57+
}
58+
59+
EqualJitterBackoffStrategy(final Duration baseDelay, final Duration maxBackoffTime, final Random random) {
60+
this.baseDelay = min(isNotNegative(baseDelay, "baseDelay"), BASE_DELAY_CEILING);
61+
this.maxBackoffTime = min(isNotNegative(maxBackoffTime, "maxBackoffTime"), MAX_BACKOFF_CEILING);
62+
this.random = random;
5463
}
5564

5665
@Override

core/sdk-core/src/main/java/software/amazon/awssdk/core/retry/backoff/FullJitterBackoffStrategy.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
package software.amazon.awssdk.core.retry.backoff;
1717

18+
import static software.amazon.awssdk.utils.NumericUtils.min;
1819
import static software.amazon.awssdk.utils.Validate.isNotNegative;
1920

2021
import java.time.Duration;
@@ -40,14 +41,21 @@
4041
public final class FullJitterBackoffStrategy implements BackoffStrategy,
4142
ToCopyableBuilder<FullJitterBackoffStrategy.Builder,
4243
FullJitterBackoffStrategy> {
44+
private static final Duration BASE_DELAY_CEILING = Duration.ofMillis(Integer.MAX_VALUE); // Around 24 days
45+
private static final Duration MAX_BACKOFF_CEILING = Duration.ofMillis(Integer.MAX_VALUE); // Around 24 days
4346

4447
private final Duration baseDelay;
4548
private final Duration maxBackoffTime;
46-
private final Random random = new Random();
49+
private final Random random;
4750

4851
private FullJitterBackoffStrategy(BuilderImpl builder) {
49-
this.baseDelay = isNotNegative(builder.baseDelay, "baseDelay");
50-
this.maxBackoffTime = isNotNegative(builder.maxBackoffTime, "maxBackoffTime");
52+
this(builder.baseDelay, builder.maxBackoffTime, new Random());
53+
}
54+
55+
FullJitterBackoffStrategy(final Duration baseDelay, final Duration maxBackoffTime, final Random random) {
56+
this.baseDelay = min(isNotNegative(baseDelay, "baseDelay"), BASE_DELAY_CEILING);
57+
this.maxBackoffTime = min(isNotNegative(maxBackoffTime, "maxBackoffTime"), MAX_BACKOFF_CEILING);
58+
this.random = random;
5159
}
5260

5361
@Override

0 commit comments

Comments
 (0)