From 109186db9c7bf677b9e31faa5f43526e12fe04ef Mon Sep 17 00:00:00 2001 From: congqixia Date: Fri, 1 Oct 2021 22:25:24 +0800 Subject: [PATCH] [skip ci] Add comment for datanode meta_service.go (#9036) Signed-off-by: Congqi Xia --- internal/datanode/meta_service.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/datanode/meta_service.go b/internal/datanode/meta_service.go index c6737be46c..04c68490ee 100644 --- a/internal/datanode/meta_service.go +++ b/internal/datanode/meta_service.go @@ -33,6 +33,7 @@ type metaService struct { rootCoord types.RootCoord } +// newMetaService creates a new metaService with provided RootCoord and collectionID func newMetaService(rc types.RootCoord, collectionID UniqueID) *metaService { return &metaService{ rootCoord: rc, @@ -40,8 +41,8 @@ func newMetaService(rc types.RootCoord, collectionID UniqueID) *metaService { } } +// getCollectionSchema get collection schema with provided collection id at specified timestamp func (mService *metaService) getCollectionSchema(ctx context.Context, collID UniqueID, timestamp Timestamp) (*schemapb.CollectionSchema, error) { - // fmt.Println("Describing collection", collID) req := &milvuspb.DescribeCollectionRequest{ Base: &commonpb.MsgBase{ MsgType: commonpb.MsgType_DescribeCollection, @@ -66,6 +67,8 @@ func (mService *metaService) getCollectionSchema(ctx context.Context, collID Uni return response.GetSchema(), nil } +// printCollectionStruct util function to print schema data +// used in tests only func printCollectionStruct(obj *etcdpb.CollectionMeta) { v := reflect.ValueOf(obj) v = reflect.Indirect(v)