From d60cd6ec6ec9693c6158d83a91e827252ce0cfac Mon Sep 17 00:00:00 2001 From: sunby Date: Wed, 20 Oct 2021 21:28:49 +0800 Subject: [PATCH] [skip ci]Add comment for GetSegmentStates (#10320) Signed-off-by: sunby --- internal/distributed/datacoord/client/client.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/distributed/datacoord/client/client.go b/internal/distributed/datacoord/client/client.go index a8d4ad00cc..b877724e34 100644 --- a/internal/distributed/datacoord/client/client.go +++ b/internal/distributed/datacoord/client/client.go @@ -309,6 +309,15 @@ func (c *Client) AssignSegmentID(ctx context.Context, req *datapb.AssignSegmentI return ret.(*datapb.AssignSegmentIDResponse), err } +// GetSegmentStates requests segment state information +// +// ctx is the context to control request deadline and cancellation +// req contains the list of segment id to query +// +// response struct `GetSegmentStatesResponse` contains the list of each state query result +// when the segment is not found, the state entry will has the field `Status` to identify failure +// otherwise the Segment State and Start position information will be returned +// error is returned only when some communication issue occurs func (c *Client) GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error) { ret, err := c.recall(func() (interface{}, error) { client, err := c.getGrpcClient()