mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
[skip ci] Add comment for mem_kv.go (#12448)
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
This commit is contained in:
parent
2b3762fa63
commit
f00ee2a3b1
@ -172,9 +172,12 @@ func (kv *MemoryKV) LoadWithPrefix(key string) ([]string, []string, error) {
|
|||||||
func (kv *MemoryKV) Close() {
|
func (kv *MemoryKV) Close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MultiRemoveWithPrefix not implemented
|
||||||
func (kv *MemoryKV) MultiRemoveWithPrefix(keys []string) error {
|
func (kv *MemoryKV) MultiRemoveWithPrefix(keys []string) error {
|
||||||
panic("not implement")
|
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 {
|
func (kv *MemoryKV) MultiSaveAndRemoveWithPrefix(saves map[string]string, removals []string) error {
|
||||||
kv.Lock()
|
kv.Lock()
|
||||||
defer kv.Unlock()
|
defer kv.Unlock()
|
||||||
@ -198,6 +201,7 @@ func (kv *MemoryKV) MultiSaveAndRemoveWithPrefix(saves map[string]string, remova
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RemoveWithPrefix remove key of given prefix in MemoryKV atomicly.
|
||||||
func (kv *MemoryKV) RemoveWithPrefix(key string) error {
|
func (kv *MemoryKV) RemoveWithPrefix(key string) error {
|
||||||
kv.Lock()
|
kv.Lock()
|
||||||
defer kv.Unlock()
|
defer kv.Unlock()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user