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

Use an UPSERT SQL query to insert or update the projection version #52

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

slashdotdash
Copy link
Member

To guarantee that an event cannot be projected more than once an "UPSERT" query is now used to INSERT or UPDATE the last seen event in the projection versions table. Using a single SQL statement will guard against concurrent handling of the same event since only one process will be able to successfully update (or insert) the projection version.

@slashdotdash slashdotdash merged commit bf0463c into master Jan 18, 2024
2 checks passed
@slashdotdash slashdotdash deleted the bug/projector-concurrency branch January 18, 2024 13:18
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.

1 participant