mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 03:18:29 +08:00
[skip ci]Update comment of cache in datanode (#9313)
Signed-off-by: Yang Xuan <xuan.yang@zilliz.com>
This commit is contained in:
parent
270cdbd4e2
commit
e7aa5eebd6
@ -5,10 +5,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Cache stores flusing segments' ids to prevent flushing the same segment again and again.
|
// Cache stores flusing segments' ids to prevent flushing the same segment again and again.
|
||||||
// Once the segment is flushed, its id will be removed from the cache.
|
// Once a segment is flushed, its id will be removed from the cache.
|
||||||
|
//
|
||||||
|
// A segment not in cache will be added into the cache when `FlushSegments` is called.
|
||||||
|
// After the flush procedure, wether the segment successfully flushed or not,
|
||||||
|
// it'll be removed from the cache. So if flush failed, the secondary flush can be triggered.
|
||||||
type Cache struct {
|
type Cache struct {
|
||||||
cacheMu sync.RWMutex
|
cacheMu sync.RWMutex
|
||||||
cacheMap map[UniqueID]bool
|
cacheMap map[UniqueID]bool // TODO GOOSE: change into sync.map
|
||||||
}
|
}
|
||||||
|
|
||||||
func newCache() *Cache {
|
func newCache() *Cache {
|
||||||
|
Loading…
Reference in New Issue
Block a user