From 9e2dfb8100216a16333a6530abd4fb1bdef7f78c Mon Sep 17 00:00:00 2001 From: congqixia Date: Sat, 2 Oct 2021 23:13:55 +0800 Subject: [PATCH] Add comment for AssignSegmentID for Datacoord in types (#9095) Signed-off-by: Congqi Xia --- internal/types/types.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/types/types.go b/internal/types/types.go index d3aec7ea9952c..bf63c2c363bcd 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -81,6 +81,19 @@ type DataCoord interface { // Flushed segments can be check via `GetFlushedSegments` API Flush(ctx context.Context, req *datapb.FlushRequest) (*datapb.FlushResponse, error) + // 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 Assigment 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 AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentIDRequest) (*datapb.AssignSegmentIDResponse, error) GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error) GetInsertBinlogPaths(ctx context.Context, req *datapb.GetInsertBinlogPathsRequest) (*datapb.GetInsertBinlogPathsResponse, error)