It looks like there is no lease interface in txn.
@YuleiXiao refresh a lease in a txn? no. What is the use case?
@heyitsanthony
I want to reduce put operation. In some condition, I just need update lease time, no need put again.
txn like this:
if value==A
then
extend the lease time
else
OpPut(key, B)
OK, if this feature is going to be supported, it'd be as a flag to Put that would refresh the lease. The Txn interface shouldn't need to change.
How about adding a function func WithRenewLease(leaseID LeaseID) OpOption? Similar to WithIgnoreLease in format.
An option to update lease associated with a key inside a transaction will be welcome. This is a common pattern for LRU eviction.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
How about adding a function
func WithRenewLease(leaseID LeaseID) OpOption? Similar to WithIgnoreLease in format.