Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
heshamMassoud opened this issue Nov 30, 2017 · 0 comments
Labels
Hacktoberfest Hacktoberfest 2021

Comments

@heshamMassoud
Copy link
Contributor

heshamMassoud commented Nov 30, 2017

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.

@heshamMassoud heshamMassoud modified the milestones: 1.0.0-M10, 1.0.0-M11 Feb 9, 2018
@heshamMassoud heshamMassoud modified the milestones: 1.0.0-M11, 1.0.0-M12 Mar 6, 2018
@ahmetoz ahmetoz mentioned this issue Nov 13, 2018
5 tasks
@heshamMassoud heshamMassoud removed this from the Next Steps milestone Jan 24, 2020
@ahmetoz ahmetoz added the filter label Feb 23, 2021
@ahmetoz ahmetoz changed the title Limit the number of retries on concurrency modification exceptions [Hactoberfest] Limit the number of retries on concurrency modification exceptions Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Hacktoberfest 2021
Projects
None yet
Development

No branches or pull requests

2 participants