charlessolar / Aggregates.NET

.NET event sourced domain driven design model via NServiceBus and GetEventStore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflict resolution

charlessolar opened this issue · comments

Removed the logic for conflict resolution because I realized simply hydrating the conflicting commands on a fresh stream and retrying the commit is a pretty bad policy.
The correct thing to do is to re-run the business logic executed by the command.
To do that off the top of my head we'd have to re-run the command's handle method for the specific instance that changed the stream.. which is just not possible to do correctly either.

Will have to look at other resolution strategies.

I guess the best way would be to let the user define his own custom conflict resolvers so he can explicitly define when a version conflict can be accepted and when it can't

Better conflict resolution has been implemented - new system supports a range of different options, can be found here https://github.com/volak/Aggregates.NET/blob/master/src/Aggregates.NET.Domain/Internal/ConflictResolvers.cs