etcd icon indicating copy to clipboard operation
etcd copied to clipboard

How to handle the key loss caused by a lease renewal failure

Open zhangtong007 opened this issue 3 years ago • 2 comments
trafficstars

etcd server version: v3.4.13 In my service, a key is renewed every four seconds. In some abnormal scenarios, the lease renewal may fail and the key is lost. How can I discover and recover this key from the service?

zhangtong007 avatar Jul 04 '22 02:07 zhangtong007

I find that if the key is lost in time, the lease renewal logic does not return error.

I use 'client.KeepAliveOnce(ctx context.Context, id LeaseID)' for renewal logic

zhangtong007 avatar Jul 04 '22 02:07 zhangtong007

show some code to simplify your context. I don't understand the question. @zhangtong007

xiaods avatar Jul 24 '22 03:07 xiaods

Closing as part of migration of issues labeled as questions to GitHub discussions. GitHub discussions makes it easier for the whole community to provide answered.

If you think your question is still relevant, feel free to ask at https://github.com/etcd-io/etcd/discussions

serathius avatar Sep 28 '22 08:09 serathius