未验证 提交 50b3d393 编写于 作者: S sunby 提交者: GitHub

Add GetRecoveryInfo interface and proto (#5598)

Signed-off-by: Nsunby <bingyi.sun@zilliz.com>
上级 fb358af0
......@@ -960,6 +960,10 @@ func (s *Server) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPath
return resp, nil
}
func (s *Server) GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error) {
panic("implement me")
}
func composeSegmentFlushMsgPack(segmentID UniqueID) msgstream.MsgPack {
msgPack := msgstream.MsgPack{
Msgs: make([]msgstream.TsMsg, 0, 1),
......
......@@ -271,3 +271,10 @@ func (c *Client) GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoR
})
return ret.(*datapb.GetSegmentInfoResponse), err
}
func (c *Client) GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error) {
ret, err := c.recall(func() (interface{}, error) {
return c.grpcClient.GetRecoveryInfo(ctx, req)
})
return ret.(*datapb.GetRecoveryInfoResponse), err
}
......@@ -277,3 +277,7 @@ func (s *Server) GetSegmentInfoChannel(ctx context.Context, req *datapb.GetSegme
func (s *Server) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest) (*commonpb.Status, error) {
return s.dataService.SaveBinlogPaths(ctx, req)
}
func (s *Server) GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error) {
return s.dataService.GetRecoveryInfo(ctx, req)
}
......@@ -31,6 +31,7 @@ service DataService {
rpc GetSegmentInfoChannel(GetSegmentInfoChannelRequest) returns (milvus.StringResponse){}
rpc SaveBinlogPaths(SaveBinlogPathsRequest) returns (common.Status){}
rpc GetRecoveryInfo(GetRecoveryInfoRequest) returns (GetRecoveryInfoResponse){}
}
service DataNode {
......@@ -249,4 +250,41 @@ message SaveBinlogPathsRequest {
repeated DDLBinlogMeta ddlBinlogPaths = 5;
PositionPair dml_position = 6;
PositionPair ddl_position =7;
}
\ No newline at end of file
}
message CheckPoint {
int64 segmentID = 1;
internal.MsgPosition position = 2;
int64 num_of_rows = 3;
}
message VchannelInfo {
int64 collectionID = 1;
string channelName = 2;
internal.MsgPosition seek_position = 3;
repeated CheckPoint checkPoints = 4;
repeated int64 flushedSegments = 5;
}
message SegmentBinlogs {
int64 segmentID = 1;
repeated FieldBinlog fieldBinlogs = 2;
}
message FieldBinlog{
int64 fieldID = 1;
repeated string binlogs = 2;
}
message GetRecoveryInfoResponse {
common.MsgBase base = 1;
repeated VchannelInfo channels = 2;
repeated SegmentBinlogs binlogs = 3;
}
message GetRecoveryInfoRequest {
common.MsgBase base = 1;
int64 collectionID = 2;
int64 partitionID = 3;
}
......@@ -61,6 +61,7 @@ type DataService interface {
GetCollectionStatistics(ctx context.Context, req *datapb.GetCollectionStatisticsRequest) (*datapb.GetCollectionStatisticsResponse, error)
GetPartitionStatistics(ctx context.Context, req *datapb.GetPartitionStatisticsRequest) (*datapb.GetPartitionStatisticsResponse, error)
GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInfoRequest) (*datapb.GetSegmentInfoResponse, error)
GetRecoveryInfo(ctx context.Context, req *datapb.GetRecoveryInfoRequest) (*datapb.GetRecoveryInfoResponse, error)
}
type IndexNode interface {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册