dotnet-etcd icon indicating copy to clipboard operation
dotnet-etcd copied to clipboard

new stable lease keep alive method

Open setood opened this issue 2 years ago • 0 comments

In everyday use of lease keepalive methods, we have encountered the following problems:

  • The CallEtcd method only retries unreachable errors, but it does not cover all errors that can be retried, for example, the stream is closed if the etcd node is terminated
  • The CallEtcd method only retries _balancer._numNodes times. This is not good for long life leases. Or for example, when k8s rollingUpdate strategy terminates etcd one by one.
  • sometimes the grpc stream is silently ended and grpc streams waits for a response longer than the lease ttl (it waits ping time if grpc pings enabled, infinity otherwise)

~~That PR not cover rare situation when parallels etcd calls move balancer connection by calling _balancer.GetConnection(). And the keepAliveCall possible can retry on single etcd node _balancer._numNodes times at row.~~ Now the method bypasses the nodes always sequentially

setood avatar Aug 03 '22 08:08 setood