Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't expose the version number #47

Merged
merged 1 commit into from
Dec 5, 2017
Merged

Don't expose the version number #47

merged 1 commit into from
Dec 5, 2017

Conversation

tomasaschan
Copy link
Owner

Exposing the version number is problematic, since if we want to change
history by deleting or adding events in the past, we have to re-version
every single event that comes later in the stream.

Instead, we now use timestamps for versioning.

However, neither EF nor EF Core guarantees the ordering of entities that
are inserted in the same batch, which means we need a way to version
events that are inserted togehter to ensure that they are retreived in
the same order they were created. Therefore, we keep the Version property
on the persisted event types, but use it only internally inside the EF
providers.

The version number is also now grouped per timestamp, so that for each new
timestamp the version number restarts.

Exposing the version number is problematic, since if we want to change
history by deleting or adding events in the past, we have to re-version
every single event that comes later in the stream.

Instead, we now use timestamps for versioning.

However, neither EF nor EF Core guarantees the ordering of entities that
are inserted in the same batch, which means we need a way to version
events that are inserted togehter to ensure that they are retreived in
the same order they were created. Therefore, we keep the Version property
on the persisted event types, but use it only internally inside the EF
providers.

The version number is also now grouped per timestamp, so that for each new
timestamp the version number restarts.
@tomasaschan tomasaschan merged commit 93a2faf into master Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant