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

Should use Singleton for EventStoreDBExpectedStreamRevisionProvider #124

Open
ebi-j opened this issue Mar 14, 2022 · 0 comments
Open

Should use Singleton for EventStoreDBExpectedStreamRevisionProvider #124

ebi-j opened this issue Mar 14, 2022 · 0 comments

Comments

@ebi-j
Copy link

ebi-j commented Mar 14, 2022

EventStoreDBExpectedStreamRevisionProvider doesn't always return what's set in If-Match, it is because it's injected as a scoped instance, thus when it's set to a new version, it will still read the older version ( because it's another instance) when trying to append an event.

How to reproduce:

Run Simple EventStoreDB example, initialize a shopping cart, and then confirm the shopping cart (version 0), and confirm it again (turn off the validation, version 1), you'll see WrongExpectedVersionException with expected version 0, but actual 1.

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

No branches or pull requests

1 participant