MemoryStore publishing Committed out of data causal order
fnipo opened this issue · comments
MemoryStore.fs is publishing Committed out of data causal order
I did an workaround on a local version that mitigated the issue
By wrapping the streams ConcurrentDictionary with a lock, it enforces sequential operations on the dictionary and consequently sequential Commited publishings.
It also means a ConcurrentDictionary is not needed anymore
Below is the change done on this LOC
let update () =
let res = streams.AddOrUpdate(streamName, seedStream, updateValue) |> Written
// raise here, once, as updateValue can conceptually be invoked multiple times
committed.Trigger((FsCodec.StreamName.parse streamName, events))
res
try lock streams update
See also #264
Released in 2.4.0 on /v2
, also on master