Skip to content

Commit 07290f2

Browse files
Clarify max attempts meaning (#546)
1 parent f406cc9 commit 07290f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sdk-api-kotlin/src/main/kotlin/dev/restate/sdk/kotlin/RetryPolicy.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ data class RetryPolicy(
2020
/** Maximum delay between retries. */
2121
val maxDelay: Duration? = null,
2222
/**
23-
* Maximum number of attempts before giving up retrying.
23+
* Maximum number of attempts, including the initial, before giving up retrying.
2424
*
2525
* The policy gives up retrying when either at least the given number of attempts is reached, or
2626
* the [maxDuration] (if set) is reached first. If both [maxAttempts] and [maxDuration] are

sdk-common/src/main/java/dev/restate/sdk/common/RetryPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public RetryPolicy setMaxDelay(@Nullable Duration maxDelay) {
4545
}
4646

4747
/**
48-
* Maximum number of attempts before giving up retrying.
48+
* Maximum number of attempts, including the initial, before giving up retrying.
4949
*
5050
* <p>The policy gives up retrying when either at least the given number of attempts is reached,
5151
* or the {@code maxDuration} specified with {@link #setMaxDuration(Duration)} (if set) is reached

0 commit comments

Comments
 (0)