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

eventually-postgres: use an isolated transaction for saving events to the tables #279

Open
ar3s3ru opened this issue Jan 15, 2024 · 0 comments
Labels
eventually-postgres Issue or Pull Request involves eventually-util crate feature New feature or request

Comments

@ar3s3ru
Copy link
Collaborator

ar3s3ru commented Jan 15, 2024

At the moment, the eventually-postgres implementation uses a stored procedure to aid in the event::Store::append and aggregate::Repository::save methods.

Instead, we could mimick the functionality of go-eventually where we use an isolated, serializable transaction to perform the update, which removes the need for stored procedures:

https://github.com/get-eventually/go-eventually/blob/c6b8740b1c0b55c25ee2132e2c7f244880f165b4/postgres/event_store.go#L92-L96

@ar3s3ru ar3s3ru added feature New feature or request eventually-postgres Issue or Pull Request involves eventually-util crate labels Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eventually-postgres Issue or Pull Request involves eventually-util crate feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant