File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
client/src/main/java/io/dapr/durabletask Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,8 @@ public RetryPolicy setMaxRetryInterval(@Nullable Duration maxRetryInterval) {
109
109
* @return this retry policy object
110
110
*/
111
111
public RetryPolicy setRetryTimeout (Duration retryTimeout ) {
112
- if (retryTimeout != null && retryTimeout .compareTo (this .firstRetryInterval ) < 0 ) {
113
- throw new IllegalArgumentException ("The value for retryTimeout must be greater than or equal to the value for firstRetryInterval." );
112
+ if (retryTimeout == null || retryTimeout .compareTo (this .firstRetryInterval ) < 0 ) {
113
+ throw new IllegalArgumentException ("The value for retryTimeout cannot be null and must be greater than or equal to the value for firstRetryInterval." );
114
114
}
115
115
this .retryTimeout = retryTimeout ;
116
116
return this ;
Original file line number Diff line number Diff line change @@ -1165,10 +1165,14 @@ public V await() {
1165
1165
1166
1166
private boolean shouldRetry () {
1167
1167
if (this .lastFailure .isNonRetriable ()) {
1168
- return false ;
1168
+ logger .warning ("Not performing any retries because the error is non retriable" );
1169
+
1170
+ return false ;
1169
1171
}
1170
1172
1171
1173
if (this .policy != null ) {
1174
+ logger .warning ("Performing retires based on policy" );
1175
+
1172
1176
return this .shouldRetryBasedOnPolicy ();
1173
1177
} else if (this .handler != null ) {
1174
1178
RetryContext retryContext = new RetryContext (
@@ -1184,6 +1188,8 @@ private boolean shouldRetry() {
1184
1188
}
1185
1189
1186
1190
private boolean shouldRetryBasedOnPolicy () {
1191
+ logger .warning (this .attemptNumber + " retries out of total %d performed " + this .policy .getMaxNumberOfAttempts ());
1192
+
1187
1193
if (this .attemptNumber >= this .policy .getMaxNumberOfAttempts ()) {
1188
1194
// Max number of attempts exceeded
1189
1195
return false ;
You can’t perform that action at this time.
0 commit comments