envato / event_sourcery

A library for building event sourced applications in Ruby
MIT License
84 stars 10 forks source link

writeEvents bug fixes #64

Closed stevehodgkiss closed 8 years ago

stevehodgkiss commented 8 years ago

The first one happened in prod where 2 reactors tried to emit an event on the same aggregate but and one raised a unique constraint violation because the auto incremented version was not being used, just the assumed version before we got the lock.

The second one is when writing multiple events the aggregate version doesn't get set correctly (it's assuming 1 event). Clearly nobody is emitting multiple events right now :)