When 2 processes try to modify the same aggregate, a database level exception is thrown. We should catch that one in the event-store-adapter and throw a concurrency exception, when the problem came from two processes trying to create the same next aggregate version. This way you can handle the exception easier without relying on adapter-implementation and act accordingly (f.e. retry)
When 2 processes try to modify the same aggregate, a database level exception is thrown. We should catch that one in the event-store-adapter and throw a concurrency exception, when the problem came from two processes trying to create the same next aggregate version. This way you can handle the exception easier without relying on adapter-implementation and act accordingly (f.e. retry)