|
@@ -39,10 +39,10 @@ public class RetryUtil {
|
|
return action.get();
|
|
return action.get();
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("{} failed on attempt {}: {}", actionName, i, e.getMessage(), e);
|
|
log.error("{} failed on attempt {}: {}", actionName, i, e.getMessage(), e);
|
|
- if (i < MAX_RETRIES) {
|
|
|
|
- log.info("{} will be retried (attempt {}/{})", actionName, i + 1, MAX_RETRIES);
|
|
|
|
|
|
+ if (i < maxRetries) {
|
|
|
|
+ log.info("{} will be retried (attempt {}/{})", actionName, i + 1, maxRetries);
|
|
} else {
|
|
} else {
|
|
- log.error("{} failed after {} retries due to non-IO error.", actionName, MAX_RETRIES);
|
|
|
|
|
|
+ log.error("{} failed after {} retries due to non-IO error.", actionName, maxRetries);
|
|
throw new RuntimeException(actionName + " failed after multiple retries due to error.", e);
|
|
throw new RuntimeException(actionName + " failed after multiple retries due to error.", e);
|
|
}
|
|
}
|
|
}
|
|
}
|