Open dubyte opened 1 month ago
What do you think about adding concurrency error. For context the event sourcing event has a version. But is not used to do optimistic locking.
Currently event store is just inserting pending events.
But as shown in CQRS page 43 listing 5.
we could query for the last version stored in posgres and if it does not match with the aggregate current version we return concurrency error and the user should load the aggragate and apply the events again.
Hi @stackus Could you give some suggestions for the version increment which has a race condition?
What do you think about adding concurrency error. For context the event sourcing event has a version. But is not used to do optimistic locking.
Currently event store is just inserting pending events.
But as shown in CQRS page 43 listing 5.
we could query for the last version stored in posgres and if it does not match with the aggregate current version we return concurrency error and the user should load the aggragate and apply the events again.