Skip to content

AppendToStreamAsync hangs when eventData enumerable throws an exception #3450

Closed
@Aethon

Description

@Aethon

Describe the bug
When calling AppendToStreamAsync, if the eventData enumerable throws an exception, the call does not return or throw until the gRPC client times the operation out. The exception from the timeout does not contain any detail from the enumerable exception.

To Reproduce
Steps to reproduce the behavior:
Run this code

public async Task HangExample()
{
    EventData MakeData(int index) => throw new Exception("bad data");

    var client = new EventStoreClient(
        EventStoreClientSettings.Create("esdb://localhost:2113?tls=false")
    );

    await client.AppendToStreamAsync(
        "somestream",
        StreamRevision.None,
        Enumerable.Range(1, 3).Select(MakeData)
    );
}

Expected behavior
The original "bad data" exception or some exception with that exception as inner exception should be thrown immediately.

Actual behavior
The call hangs until the gRPC call times out. The exception that is thrown simply indicates that the deadline expired with no additional detail.

EventStore details

  • EventStore server version: 20.10.5
  • Operating system: macOs
  • EventStore client version (if applicable): 20.10.0

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