[skip ci]Add comment for FlushSegments (#10775)

Signed-off-by: sunby <bingyi.sun@zilliz.com>
This commit is contained in:
sunby 2021-10-27 20:32:43 +08:00 committed by GitHub
parent 0f1031b6cf
commit 110174bebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,6 +246,14 @@ func (c *Client) WatchDmChannels(ctx context.Context, req *datapb.WatchDmChannel
return ret.(*commonpb.Status), err
}
// FlushSegments notifies DataNode to flush the segments req provids. The flush tasks are async to this
// rpc, DataNode will flush the segments in the background.
//
// Return UnexpectedError code in status:
// If DataNode isn't in HEALTHY: states not HEALTHY or dynamic checks not HEALTHY
// If DataNode doesn't find the correspounding segmentID in its memeory replica
// Return Success code in status and trigers background flush:
// Log an info log if a segment is under flushing
func (c *Client) FlushSegments(ctx context.Context, req *datapb.FlushSegmentsRequest) (*commonpb.Status, error) {
ret, err := c.recall(func() (interface{}, error) {
client, err := c.getGrpcClient()