We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4183ab1 commit d8af033Copy full SHA for d8af033
kv/kv.go
@@ -79,6 +79,7 @@ type LockCtx struct {
79
// LockCtx specially.
80
ResourceGroupTagger func(*kvrpcpb.PessimisticLockRequest) []byte
81
OnDeadlock func(*tikverr.ErrDeadlock)
82
+ OnMemChange func(int)
83
}
84
85
// LockWaitTime returns lockWaitTimeInMs
@@ -135,3 +136,13 @@ func (ctx *LockCtx) IterateValuesNotLocked(f func([]byte, []byte)) {
135
136
137
138
139
+
140
+// getValuesKSize returns Values key size
141
+func (ctx *LockCtx) GetValuesKSize() uint64 {
142
+ return uint64(unsafe.Sizeof(*new(string)))
143
+}
144
145
+// getValuesKSize returns Values value size
146
+func (ctx *LockCtx) GetValuesVSize() uint64 {
147
+ return uint64(unsafe.Sizeof(*new(ReturnedValue)))
148
0 commit comments