libkv icon indicating copy to clipboard operation
libkv copied to clipboard

Enhancement: Automatic and periodic renew of Key lease for basic Put operation

Open abronan opened this issue 10 years ago • 0 comments

libkv should allow to automatically renew the lease for a key (using TTLs) as long as the client is still up and running. We may want to return a stopChan to stop the process of automatically renewing the key if needed.

The same way we have PeriodicRenew of sessions using Consul, it can be useful to not explicitely invoke a renewTTL every T interval time but just know that the key lives until the client dies and the TTL expires.

Some work has been done for the Lock() call which automatically renew the lease for a Key to keep the lock under custody. If a signal is sent to the stopChan, the Lock process stops renewing the TTL and/or Unlocks the key. This work should be extended for the basic Put operation of supported backends.

abronan avatar Sep 24 '15 05:09 abronan