JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.79k stars 441 forks source link

bug: Inline projections don't have correct version when appending to an existing stream (quickappend) #3310

Closed elexisvenator closed 1 month ago

elexisvenator commented 1 month ago

Found as part of https://github.com/JasperFx/marten/issues/3307, Inline projections take their revision from the version of the last event appended to a stream, but for quickAppend this is not a valid version.

This is the tests I was using for performance, one of them is failing due to this issue, so the rest can be removed if you dont care about them. The size of the streams / iterations are scaled way back to make the tests fast.

jeremydmiller commented 1 month ago

Got it with some merge/rebase clumsiness. @elexisvenator Thanks for doing all the work to find this issue and to repro it!