Add comment for metaTable of indexcoord (#8411)

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
This commit is contained in:
cai.zhang 2021-09-23 21:37:55 +08:00 committed by GitHub
parent d308661f63
commit bd48f6f2db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,9 @@ import (
"github.com/milvus-io/milvus/internal/proto/indexpb" "github.com/milvus-io/milvus/internal/proto/indexpb"
) )
// Meta is used to record the state of the index.
// revision: The number of times IndexMeta has been changed in ETCD. It's the same as Event.Kv.Version in ETCD.
// indexMeta:A structure that records the state of the index defined by proto.
type Meta struct { type Meta struct {
indexMeta *indexpb.IndexMeta indexMeta *indexpb.IndexMeta
revision int64 revision int64
@ -41,6 +44,7 @@ type metaTable struct {
lock sync.RWMutex lock sync.RWMutex
} }
// NewMetaTable is used to create a new meta table.
func NewMetaTable(kv *etcdkv.EtcdKV) (*metaTable, error) { func NewMetaTable(kv *etcdkv.EtcdKV) (*metaTable, error) {
mt := &metaTable{ mt := &metaTable{
client: kv, client: kv,