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.
Situation
Currently on concurrency modification exceptions the sync retries with no limit until there is no error. See:
commercetools-sync-java/src/main/java/com/commercetools/sync/commons/BaseSync.java
Lines 115 to 124 in 7cacc37
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.