client-go icon indicating copy to clipboard operation
client-go copied to clipboard

KVTxn Set not support TTL

Open newcworld opened this issue 3 years ago • 1 comments

// Set sets the value for key k as v into kv store.
// v must NOT be nil or empty, otherwise it returns ErrCannotSetNilValue.
func (txn *KVTxn) Set(k []byte, v []byte) error {
	txn.setCnt++
	return txn.us.GetMemBuffer().Set(k, v)
}

Whether I can set kv in tx with TTL?

newcworld avatar Sep 20 '22 18:09 newcworld

No, only rawkv supports TTL.

disksing avatar Sep 21 '22 07:09 disksing