joliver/EventStore — pull request #79 by kredinor (2011-10-26 21:05:54+00:00)
Title: Fix for concurrency bug that caused commits to be lost

"Commit" used a (non-atomic) sub-select to do optimistic concurrency. Highly concurrent processing (another thread inserts a row *after* the first thread's sub-select, but *before* the insert) caused real concurrency failures to falsely be interpreted as duplicate commits and ignored. Commits that should have been retried were lost. The fix works for us, but it's only implemented for sql server persistence.