jonsequitur / Its.Cqrs

A set of libraries for CQRS and Event Sourcing, with a Domain-Driven Design flavor.
Other
77 stars 21 forks source link

Every Projection is a snow flake #215

Open xavierjohn opened 6 years ago

xavierjohn commented 6 years ago

I have noticed multiple times where Its.CQRS skips some events. I think there should be a setting to halt on any projection error.

xavierjohn commented 6 years ago

Here is one possible reason. The lock taken by the projection can be lost if Azure recycles the SQL. Current machine will continue to project and a new machine can get the stored proc lock. The code probably needs to change to making an entry in a SQL table as to who has the lock. For now the workaround is to scaled to 1 computer when a re-projection is needed but this problem can happen when projections are trying to stay up to date.