Closed acbeni closed 2 years ago
It really bad to see that this has been here since ages!
I started to take a look at it, but the middleware approach here doesn't help as the middleware only knows about the HTTP abstraction request. Therefor it's not straight forward to update the request with the new version.
A possible solution could be to extend the Request/ApiMethod classes that one can add a lambda for conflict resolution. Especially it makes more sense to decide retry per request instead of doing it globally at the client level.
With 8.0.0 a RetryHandler has been added. It allows to wrap request and in case of a ConcurrentModificationException to retry with the updated version number
We should evaluate whether how we can add a retry logic to our SDK, it would be a good exercise to see if our middleware chaining would allow such a use case.