Improved optimistic versioning of event stream append operations #922
Replies: 6 comments
-
@ricardoduncan Meh, I see that it's missing from the docs. See the tests for an example of how to use that: https://github.com/JasperFx/marten/blob/master/src/Marten.Testing/Events/asserting_on_expected_event_version_on_append.cs The actual assertion is done in C# code |
Beta Was this translation helpful? Give feedback.
-
@ricardoduncan, @jeremydmiller hmm, should be documented (I have a vague memory of writing something brief): http://jasperfx.github.io/marten/documentation/events/appending/, under Appending & Assertions. |
Beta Was this translation helpful? Give feedback.
-
I'm giving this a rename today. |
Beta Was this translation helpful? Give feedback.
-
@jeremydmiller could you elaborate what you'd like to change in the current mechanism? |
Beta Was this translation helpful? Give feedback.
-
I don't have anything specific in mind yet, just sounds like we need to make it easier to use. Might be mostly docs. Could help to have a way to issue read locks for better concurrency. |
Beta Was this translation helpful? Give feedback.
-
Ah ok, I think that it should be mostly docs. In my previous project, we tried hard with @tpodolak to break it but weren't able 😉 Maybe we could check the sequence issues that @jacobpovar had. |
Beta Was this translation helpful? Give feedback.
-
How does one trigger the expected version check that prevents appending to an event stream if the version after the Append call does not match that supplied?
I have tried faking the stream version in the
mt_streams
table, but this does not cause the assertion to occur.I can see the version check is not being performed in any of the database functions either. This is an important evaluation criteria for me in terms of using Marten as an event store.
Beta Was this translation helpful? Give feedback.
All reactions