From 43caa196860ae63b4f31892b8e410466a9bb71de Mon Sep 17 00:00:00 2001 From: congqixia Date: Tue, 26 Oct 2021 14:19:02 +0800 Subject: [PATCH] [skip ci] Add comment for types.go - Datacoord.SaveBinlogPaths (#10627) 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 73387bdd1c..a2c2ae170f 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -192,6 +192,19 @@ type DataCoord interface { // response struct `GetRecoveryInfoResponse` contains the list of segments info and corresponding vchannel info // error is returned only when some communication issue occurs GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error) + + // SaveBinlogPaths updates segments binlogs(including insert binlogs, stats logs and delta logs) + // and related message stream positions + // + // ctx is the context to control request deadline and cancellation + // req contains the collection/partition id to query + // + // response status contains the status/error code and failing reason if any + // error is returned only when some communication issue occurs + // + // there is a constraint that the `SaveBinlogPaths` requests of same segment shall be passed in sequence + // the root reason is each `SaveBinlogPaths` will overwrite the checkpoint position + // if the constraint is broken, the checkpoint position will not be monotonically increasing and the integrity will be compromised SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) (*commonpb.Status, error) GetFlushedSegments(ctx context.Context, req *datapb.GetFlushedSegmentsRequest) (*datapb.GetFlushedSegmentsResponse, error)