[skip ci] Add comment for mem_kv.go (#12448)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
This commit is contained in:
shaoyue 2021-11-30 16:08:59 +08:00 committed by GitHub
parent 2b3762fa63
commit f00ee2a3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,9 +172,12 @@ func (kv *MemoryKV) LoadWithPrefix(key string) ([]string, []string, error) {
func (kv *MemoryKV) Close() {
}
// MultiRemoveWithPrefix not implemented
func (kv *MemoryKV) MultiRemoveWithPrefix(keys []string) error {
panic("not implement")
}
// MultiSaveAndRemoveWithPrefix saves key-value pairs in @saves, & remove key with prefix in @removals in MemoryKV atomicly.
func (kv *MemoryKV) MultiSaveAndRemoveWithPrefix(saves map[string]string, removals []string) error {
kv.Lock()
defer kv.Unlock()
@ -198,6 +201,7 @@ func (kv *MemoryKV) MultiSaveAndRemoveWithPrefix(saves map[string]string, remova
return nil
}
// RemoveWithPrefix remove key of given prefix in MemoryKV atomicly.
func (kv *MemoryKV) RemoveWithPrefix(key string) error {
kv.Lock()
defer kv.Unlock()