Looks like Conn, watches and id etcd.LeaseID of zetcd.session are resources that associate a particular zookeeper client. I am expecting all of them are closing together.
However, Conn and watches close when the session.Close() is calling, and lease will be revoked after getting a CloseRequest from zookeeper client.
When I am facing the edge case that zookeeper client power off or kill -9, there is no CloseRequest at all. The Session will keep the lease forever instead of revoking.
So I am wondering, shall we revoke the lease during session closing?
Looks like
Conn
,watches
andid etcd.LeaseID
of zetcd.session are resources that associate a particular zookeeper client. I am expecting all of them are closing together. However,Conn
andwatches
close when the session.Close() is calling, andlease
will be revoked after getting a CloseRequest from zookeeper client. When I am facing the edge case that zookeeper client power off or kill -9, there is no CloseRequest at all. The Session will keep the lease forever instead of revoking. So I am wondering, shall we revoke the lease during session closing?