Skip to content

Should use Singleton for EventStoreDBExpectedStreamRevisionProvider #124

@ebi-j

Description

@ebi-j

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions