forked from mikegore1000/SimpleEventStore
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
The InMemoryStorageEngine reports an incorrect expected revision number. It is off by 1.
if (firstEvent.EventNumber - 1 != streams[streamId].Count)
{
throw new ConcurrencyException($"Concurrency conflict when appending to stream {streamId}. Expected revision {firstEvent.EventNumber} : Actual revision {streams[streamId].Count}");
}
It shoud read:
if (firstEvent.EventNumber != streams[streamId].Count + 1)
{
throw new ConcurrencyException($"Concurrency conflict when appending to stream {streamId}. Expected revision {firstEvent.EventNumber} : Actual revision {streams[streamId].Count + 1}");
}
SimpleEventStore/src/SimpleEventStore/SimpleEventStore/InMemory/InMemoryStorageEngine.cs
Line 29 in 60f1460
| throw new ConcurrencyException($"Concurrency conflict when appending to stream {streamId}. Expected revision {firstEvent.EventNumber} : Actual revision {streams[streamId].Count}"); |