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

AppendToStreamAsync hangs when eventData enumerable throws an exception #203

Open
Aethon opened this issue Mar 10, 2022 · 1 comment
Open

Comments

@Aethon
Copy link

Aethon commented Mar 10, 2022

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
@NielsPilgaard
Copy link
Contributor

I cannot reproduce this using EventStore.Client.Grpc.Streams.22.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants