[skip ci]Update comment in datanode package (#9428)

Signed-off-by: Yang Xuan <xuan.yang@zilliz.com>
This commit is contained in:
XuanYang-cn 2021-10-07 23:50:52 +08:00 committed by GitHub
parent 9526d22dc7
commit a1f9e46e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -32,6 +32,7 @@ type allocator struct {
rootCoord types.RootCoord
}
// check if allocator implements allocatorInterface
var _ allocatorInterface = &allocator{}
func newAllocator(s types.RootCoord) *allocator {
@ -40,7 +41,7 @@ func newAllocator(s types.RootCoord) *allocator {
}
}
// allocID allocate one ID from rootCoord
// allocID allocates one ID from rootCoord
func (alloc *allocator) allocID() (UniqueID, error) {
ctx := context.TODO()
resp, err := alloc.rootCoord.AllocID(ctx, &rootcoordpb.AllocIDRequest{

View File

@ -33,7 +33,7 @@ type metaService struct {
rootCoord types.RootCoord
}
// newMetaService creates a new metaService with provided RootCoord and collectionID
// newMetaService creates a new metaService with provided RootCoord and collectionID.
func newMetaService(rc types.RootCoord, collectionID UniqueID) *metaService {
return &metaService{
rootCoord: rc,
@ -41,7 +41,7 @@ func newMetaService(rc types.RootCoord, collectionID UniqueID) *metaService {
}
}
// getCollectionSchema get collection schema with provided collection id at specified timestamp
// 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) {
req := &milvuspb.DescribeCollectionRequest{
Base: &commonpb.MsgBase{
@ -67,8 +67,7 @@ func (mService *metaService) getCollectionSchema(ctx context.Context, collID Uni
return response.GetSchema(), nil
}
// printCollectionStruct util function to print schema data
// used in tests only
// printCollectionStruct util function to print schema data, used in tests only.
func printCollectionStruct(obj *etcdpb.CollectionMeta) {
v := reflect.ValueOf(obj)
v = reflect.Indirect(v)