Situation
Currently on concurrency modification exceptions the sync retries with no limit until there is no error. See:
|
protected static <S> S executeSupplierIfConcurrentModificationException( |
|
@Nonnull final Throwable sphereException, |
|
@Nonnull final Supplier<S> onConcurrentModificationSupplier, |
|
@Nonnull final Supplier<S> onOtherExceptionSupplier) { |
|
final Throwable completionExceptionCause = sphereException.getCause(); |
|
if (completionExceptionCause instanceof ConcurrentModificationException) { |
|
return onConcurrentModificationSupplier.get(); |
|
} |
|
return onOtherExceptionSupplier.get(); |
|
} |
Complication
It causes unnecessary api calls if the platform returns 409 - ConcurrentModificationException for the requests.
Resolution
Limit the number of retries on concurrency modification exceptions.