[skip ci]Add comment for AssignSegmentID (#10319)

Signed-off-by: sunby <bingyi.sun@zilliz.com>
pull/10329/head
sunby 2021-10-20 21:26:55 +08:00 committed by GitHub
parent 17781df615
commit 95644f71e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -281,6 +281,19 @@ func (c *Client) Flush(ctx context.Context, req *datapb.FlushRequest) (*datapb.F
return ret.(*datapb.FlushResponse), err
}
// AssignSegmentID applies allocations for specified Coolection/Partition and related Channel Name(Virtial Channel)
//
// ctx is the context to control request deadline and cancellation
// req contains the requester's info(id and role) and the list of Assignment Request,
// which coontains the specified collection, partitaion id, the related VChannel Name and row count it needs
//
// response struct `AssignSegmentIDResponse` contains the the assignment result for each request
// error is returned only when some communication issue occurs
// if some error occurs in the process of `AssignSegmentID`, it will be recorded and returned in `Status` field of response
//
// `AssignSegmentID` will applies current configured allocation policies for each request
// if the VChannel is newly used, `WatchDmlChannels` will be invoked to notify a `DataNode`(selected by policy) to watch it
// if there is anything make the allocation impossible, the response will not contain the corresponding result
func (c *Client) AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest) (*datapb.AssignSegmentIDResponse, error) {
ret, err := c.recall(func() (interface{}, error) {
client, err := c.getGrpcClient()