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

Event repository fix edge case #1320

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

MalpenZibo
Copy link
Collaborator

@MalpenZibo MalpenZibo commented Dec 19, 2024

This PR resolves a "bug" that doesn't create any real problem.

When creating multiple events on a new stream ID, the version number sequence used is [0, 0, 1, 2 ... n]. This sequence is correctly saved in the database as [0, 1, 2, 3 ... n].

After this changes to create an event that creates a new stream ID, the first version number should be undefined so the sequence to use will be [undefined, 0, 1, 2 ... n]. Inside the database nothing changes and the sequence is saved as [0, 1, 2, 3 ... n].

@MalpenZibo MalpenZibo changed the title Event reppository test edge case Event repository fix edge case Dec 19, 2024
@MalpenZibo MalpenZibo marked this pull request as ready for review January 7, 2025 14:38
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.

5 participants