BATCH-1717: catch and rethrow to protect against retry infinite loop
This commit is contained in:
@@ -245,7 +245,11 @@ public class RetryTemplate implements RetryOperations {
|
||||
|
||||
doOnErrorInterceptors(retryCallback, context, e);
|
||||
|
||||
registerThrowable(retryPolicy, state, context, e);
|
||||
try {
|
||||
registerThrowable(retryPolicy, state, context, e);
|
||||
} catch (Exception ex) {
|
||||
throw new TerminatedRetryException("Terminated retry after error in policy", ex);
|
||||
}
|
||||
|
||||
if (canRetry(retryPolicy, context) && !context.isExhaustedOnly()) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user