Skip to content

[Hactoberfest] Limit the number of retries on concurrency modification exceptions #197

@heshamMassoud

Description

@heshamMassoud

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions