From fa4ccb05fe51be3495ec3c5b5b925dae62a56cd6 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Wed, 29 Sep 2021 10:37:59 +0800 Subject: [PATCH] [skip-ci]Add comment on FlushSegments of DataNode interface (#8767) Signed-off-by: yangxuan --- internal/types/types.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/types/types.go b/internal/types/types.go index bea3fe7e82..4c66824e31 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -45,6 +45,15 @@ type DataNode interface { Component WatchDmChannels(ctx context.Context, req *datapb.WatchDmChannelsRequest) (*commonpb.Status, error) + + // 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 FlushSegments(ctx context.Context, req *datapb.FlushSegmentsRequest) (*commonpb.Status, error) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)