From bd48f6f2db0bf1ca5d022f911ce66089331362d3 Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Thu, 23 Sep 2021 21:37:55 +0800 Subject: [PATCH] Add comment for metaTable of indexcoord (#8411) Signed-off-by: cai.zhang --- internal/indexcoord/meta_table.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/indexcoord/meta_table.go b/internal/indexcoord/meta_table.go index 640b8311fc..aba6ab768e 100644 --- a/internal/indexcoord/meta_table.go +++ b/internal/indexcoord/meta_table.go @@ -29,6 +29,9 @@ import ( "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 { indexMeta *indexpb.IndexMeta revision int64 @@ -41,6 +44,7 @@ type metaTable struct { lock sync.RWMutex } +// NewMetaTable is used to create a new meta table. func NewMetaTable(kv *etcdkv.EtcdKV) (*metaTable, error) { mt := &metaTable{ client: kv,