We just ran into an issue in our integration tests, where IEventStream.CommitChanges throws a ConcurrencyException although there are no concurrent modifications (and indeed no commits in the database). Debugging showed that the exceptions are thrown by OptimisticPipelineHook.PreCommit - the "heads" stored by the hook did not match what was in the database.
The reason is that our tests use IPersistStreams.Purge to clear the event store, and the OptimisticPipelineHook doesn't clear its cache when that API is called.
We just ran into an issue in our integration tests, where
IEventStream.CommitChangesthrows aConcurrencyExceptionalthough there are no concurrent modifications (and indeed no commits in the database). Debugging showed that the exceptions are thrown byOptimisticPipelineHook.PreCommit- the "heads" stored by the hook did not match what was in the database.The reason is that our tests use
IPersistStreams.Purgeto clear the event store, and theOptimisticPipelineHookdoesn't clear its cache when that API is called.