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

Append multiple events + ExpectedVersion.NoStream = bug #159

Open
shaan1337 opened this issue Sep 20, 2021 · 0 comments
Open

Append multiple events + ExpectedVersion.NoStream = bug #159

shaan1337 opened this issue Sep 20, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@shaan1337
Copy link
Member

Describe the bug
Appending multiple events with ExpectedVersion.NoStream to a stream that doesn't exist or that has been soft deleted throws wrong expected version.

To Reproduce
Steps to reproduce the behavior:

  1. Start an empty database
  2. Write two events with expected version NoStream
var e = new EventData(Uuid.NewUuid(), "type", new byte[0], new byte[0]);
await client.AppendToStreamAsync("stream", StreamState.NoStream, new EventData[]{e,e});
  1. Throws:
Unhandled exception. EventStore.Client.WrongExpectedVersionException: Append failed due to WrongExpectedVersion. Stream: stream, Expected state: NoStream, Actual version: 1

Both events are appended but the client throws the wrong expected version error.
The same behaviour can be seen with a soft deleted stream - the events are appended but the client throws an error.

Expected behavior
No error should be thrown.

Actual behavior
Wrong expected version error is thrown

Config/Logs/Screenshots
If applicable, please attach your node configuration, logs or any screenshots.

EventStore details

  • EventStore server version:
    master (EventStore/EventStore@9a56a94)

  • Operating system:
    Ubuntu 18.04

  • EventStore client version (if applicable):
    EventStore.Client.Grpc.Streams 21.2.0

@oskardudycz oskardudycz added the bug Something isn't working label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants