Skip to content

Dotnet client not throwing when duplicate stream id is created with StreamState.NoStream #5519

@awillsoft

Description

@awillsoft

Description
Dotnet GRPC client AppendToStreamAsync method is not throwing exception error when duplicated streams ids are created with same stream name and expected state is StreamState.NoStream,
instead of throwing, they are returning same log position number of already created stream.

this is not the expected behavior like is expected and documentation says:

When appending events to a stream, you can supply a stream state or stream revision. Your client uses this to inform EventStoreDB of the state or version you expect the stream to be in when appending an event. If the stream isn't in that state, an exception will be thrown.

Handling concurrency

To Reproduce
Steps to reproduce the behavior:
var streamStateNoStrem = StreamState.NoStream;

    var cd = await client.AppendToStreamAsync(streamName, streamStateNoStrem, events, cancellationToken: cancellationToken);
    var cd2 = await client.AppendToStreamAsync(streamName, streamStateNoStrem, events, cancellationToken: cancellationToken);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues which are a software defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions