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) {
109109 * @return this retry policy object
110110 */
111111 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." );
114114 }
115115 this .retryTimeout = retryTimeout ;
116116 return this ;
Original file line number Diff line number Diff line change @@ -1165,10 +1165,14 @@ public V await() {
11651165
11661166 private boolean shouldRetry () {
11671167 if (this .lastFailure .isNonRetriable ()) {
1168- return false ;
1168+ logger .warning ("Not performing any retries because the error is non retriable" );
1169+
1170+ return false ;
11691171 }
11701172
11711173 if (this .policy != null ) {
1174+ logger .warning ("Performing retires based on policy" );
1175+
11721176 return this .shouldRetryBasedOnPolicy ();
11731177 } else if (this .handler != null ) {
11741178 RetryContext retryContext = new RetryContext (
@@ -1184,6 +1188,8 @@ private boolean shouldRetry() {
11841188 }
11851189
11861190 private boolean shouldRetryBasedOnPolicy () {
1191+ logger .warning (this .attemptNumber + " retries out of total %d performed " + this .policy .getMaxNumberOfAttempts ());
1192+
11871193 if (this .attemptNumber >= this .policy .getMaxNumberOfAttempts ()) {
11881194 // Max number of attempts exceeded
11891195 return false ;
You can’t perform that action at this time.
0 commit comments