client-go
client-go copied to clipboard
KVTxn Set not support TTL
// 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?
No, only rawkv supports TTL.