mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
[skip ci]Update comment in datanode package (#9428)
Signed-off-by: Yang Xuan <xuan.yang@zilliz.com>
This commit is contained in:
parent
9526d22dc7
commit
a1f9e46e44
@ -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{
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user