EventStore / EventStore-Client-Go

Go Client for Event Store version 20 and above.
Apache License 2.0
105 stars 27 forks source link

Read Stream always return error on cluster rebalance #190

Closed itgram closed 3 weeks ago

itgram commented 4 weeks ago

In a cluster mode setup of EventStoreDB, when the leader node of the cluster drops and we attempt to use ReadStream method, it raises an error and doesn’t rebalance with the updated cluster members.

This issue occurs here: https://github.com/EventStore/EventStore-Client-Go/blob/8206ac84067e5a6d591f71fafb82758015fb9f3c/esdb/client.go#L291

If we call ReadStream again, it fails repeatedly because client.grpcClient.handleError is not invoked in case of an error, which prevents the reconnection process from being triggered.

Here’s a suggested solution https://github.com/EventStore/EventStore-Client-Go/pull/188

itgram commented 3 weeks ago

@YoEight thanks for your support