2021-01-14 14:24:14 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package milvus.proto.data;
|
|
|
|
|
2021-04-22 14:45:57 +08:00
|
|
|
option go_package = "github.com/milvus-io/milvus/internal/proto/datapb";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
|
|
|
import "common.proto";
|
|
|
|
import "internal.proto";
|
2021-01-22 11:07:07 +08:00
|
|
|
import "milvus.proto";
|
2021-04-09 09:55:04 +08:00
|
|
|
import "schema.proto";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-06-21 18:22:13 +08:00
|
|
|
service DataCoord {
|
2021-03-12 14:22:09 +08:00
|
|
|
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
|
|
|
|
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
|
|
|
|
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
|
|
|
|
|
2021-06-23 16:56:11 +08:00
|
|
|
rpc Flush(FlushRequest) returns (FlushResponse) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
|
|
|
|
rpc AssignSegmentID(AssignSegmentIDRequest) returns (AssignSegmentIDResponse) {}
|
|
|
|
|
|
|
|
rpc GetSegmentInfo(GetSegmentInfoRequest) returns (GetSegmentInfoResponse) {}
|
|
|
|
rpc GetSegmentStates(GetSegmentStatesRequest) returns (GetSegmentStatesResponse) {}
|
|
|
|
rpc GetInsertBinlogPaths(GetInsertBinlogPathsRequest) returns (GetInsertBinlogPathsResponse) {}
|
|
|
|
|
|
|
|
rpc GetCollectionStatistics(GetCollectionStatisticsRequest) returns (GetCollectionStatisticsResponse) {}
|
|
|
|
rpc GetPartitionStatistics(GetPartitionStatisticsRequest) returns (GetPartitionStatisticsResponse) {}
|
|
|
|
|
|
|
|
rpc GetSegmentInfoChannel(GetSegmentInfoChannelRequest) returns (milvus.StringResponse){}
|
2021-05-20 11:34:45 +08:00
|
|
|
|
|
|
|
rpc SaveBinlogPaths(SaveBinlogPathsRequest) returns (common.Status){}
|
2021-06-07 14:16:36 +08:00
|
|
|
rpc GetRecoveryInfo(GetRecoveryInfoRequest) returns (GetRecoveryInfoResponse){}
|
2021-03-12 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
service DataNode {
|
|
|
|
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
|
|
|
|
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
|
|
|
|
|
|
|
|
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
|
|
|
|
rpc FlushSegments(FlushSegmentsRequest) returns(common.Status) {}
|
|
|
|
}
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message FlushRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 4;
|
|
|
|
}
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-06-23 16:56:11 +08:00
|
|
|
message FlushResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
repeated int64 segmentIDs = 4;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message SegmentIDRequest {
|
2021-01-18 19:32:08 +08:00
|
|
|
uint32 count = 1;
|
2021-03-12 14:22:09 +08:00
|
|
|
string channel_name = 2;
|
|
|
|
int64 collectionID = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 partitionID = 4;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message AssignSegmentIDRequest {
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 nodeID = 1;
|
|
|
|
string peer_role = 2;
|
2021-03-12 14:22:09 +08:00
|
|
|
repeated SegmentIDRequest segmentIDRequests = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message SegmentIDAssignment {
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 segID = 1;
|
2021-03-12 14:22:09 +08:00
|
|
|
string channel_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
uint32 count = 3;
|
|
|
|
int64 collectionID = 4;
|
|
|
|
int64 partitionID = 5;
|
|
|
|
uint64 expire_time = 6;
|
|
|
|
common.Status status = 7;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message AssignSegmentIDResponse {
|
|
|
|
repeated SegmentIDAssignment segIDAssignments = 1;
|
2021-01-19 12:10:49 +08:00
|
|
|
common.Status status = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetSegmentStatesRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-03-12 14:22:09 +08:00
|
|
|
repeated int64 segmentIDs = 2;
|
2021-02-02 10:58:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentStateInfo {
|
|
|
|
int64 segmentID = 1;
|
2021-02-03 18:55:00 +08:00
|
|
|
common.SegmentState state = 2;
|
2021-05-21 14:51:25 +08:00
|
|
|
internal.MsgPosition start_position = 3;
|
|
|
|
internal.MsgPosition end_position = 4;
|
|
|
|
common.Status status = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetSegmentStatesResponse {
|
2021-02-02 10:58:39 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated SegmentStateInfo states = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetSegmentInfoRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-03-12 14:22:09 +08:00
|
|
|
repeated int64 segmentIDs = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetSegmentInfoResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated SegmentInfo infos = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetInsertBinlogPathsRequest {
|
2021-01-20 09:36:50 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-03-12 14:22:09 +08:00
|
|
|
int64 segmentID = 2;
|
2021-01-20 09:36:50 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetInsertBinlogPathsResponse {
|
|
|
|
repeated int64 fieldIDs = 1;
|
|
|
|
repeated internal.StringList paths = 2;
|
|
|
|
common.Status status = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetCollectionStatisticsRequest {
|
2021-01-22 11:07:07 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-02-02 14:25:58 +08:00
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
2021-01-22 11:07:07 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetCollectionStatisticsResponse {
|
2021-01-22 11:07:07 +08:00
|
|
|
repeated common.KeyValuePair stats = 1;
|
|
|
|
common.Status status = 2;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetPartitionStatisticsRequest{
|
2021-01-22 11:07:07 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-02-02 14:25:58 +08:00
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
int64 partitionID = 4;
|
2021-01-22 11:07:07 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetPartitionStatisticsResponse {
|
2021-01-22 11:07:07 +08:00
|
|
|
repeated common.KeyValuePair stats = 1;
|
|
|
|
common.Status status = 2;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetSegmentInfoChannelRequest {
|
2021-01-22 09:36:40 +08:00
|
|
|
}
|
|
|
|
|
2021-05-25 15:35:37 +08:00
|
|
|
|
2021-06-04 09:57:54 +08:00
|
|
|
message VchannelInfo {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
string channelName = 2;
|
2021-06-04 16:29:43 +08:00
|
|
|
internal.MsgPosition seek_position = 3;
|
2021-06-08 19:25:37 +08:00
|
|
|
repeated SegmentInfo unflushedSegments = 4;
|
2021-06-04 16:29:43 +08:00
|
|
|
repeated int64 flushedSegments = 5;
|
2021-06-04 09:57:54 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message WatchDmChannelsRequest {
|
|
|
|
common.MsgBase base = 1;
|
2021-06-04 09:57:54 +08:00
|
|
|
repeated VchannelInfo vchannels = 2;
|
2021-01-22 09:36:40 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message FlushSegmentsRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
repeated int64 segmentIDs = 4;
|
2021-01-22 09:36:40 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message SegmentMsg{
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
SegmentInfo segment = 2;
|
|
|
|
}
|
2021-01-25 15:17:17 +08:00
|
|
|
|
2021-03-20 09:50:42 +08:00
|
|
|
// key: ${prefix}/${segmentID}/${fieldID}/${idx}
|
|
|
|
message SegmentFieldBinlogMeta {
|
|
|
|
int64 fieldID = 1;
|
|
|
|
string binlog_path = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// key: ${prefix}/${collectionID}/${idx}
|
|
|
|
message DDLBinlogMeta {
|
|
|
|
string ddl_binlog_path = 1;
|
|
|
|
string ts_binlog_path = 2;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message FieldFlushMeta {
|
|
|
|
int64 fieldID = 1;
|
|
|
|
repeated string binlog_paths = 2;
|
2021-01-22 09:36:40 +08:00
|
|
|
}
|
2021-01-24 21:20:11 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message SegmentFlushMeta{
|
|
|
|
int64 segmentID = 1;
|
|
|
|
bool is_flushed = 2;
|
|
|
|
repeated FieldFlushMeta fields = 5;
|
2021-01-24 21:20:11 +08:00
|
|
|
}
|
2021-03-12 14:22:09 +08:00
|
|
|
|
|
|
|
message DDLFlushMeta {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated string binlog_paths = 2;
|
2021-03-20 09:50:42 +08:00
|
|
|
}
|
2021-04-09 09:55:04 +08:00
|
|
|
|
|
|
|
message CollectionInfo {
|
|
|
|
int64 ID = 1;
|
|
|
|
schema.CollectionSchema schema = 2;
|
|
|
|
repeated int64 partitions = 3;
|
|
|
|
}
|
|
|
|
message SegmentInfo {
|
|
|
|
int64 ID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
string insert_channel = 4;
|
2021-06-04 11:45:45 +08:00
|
|
|
int64 num_of_rows = 5;
|
2021-05-21 14:51:25 +08:00
|
|
|
common.SegmentState state = 6;
|
2021-06-04 11:45:45 +08:00
|
|
|
internal.MsgPosition dml_position = 7;
|
|
|
|
int64 max_row_num = 8;
|
|
|
|
uint64 last_expire_time = 9;
|
2021-06-15 11:06:42 +08:00
|
|
|
internal.MsgPosition start_position = 10;
|
2021-04-09 09:55:04 +08:00
|
|
|
}
|
2021-05-20 11:34:45 +08:00
|
|
|
|
2021-05-25 15:35:37 +08:00
|
|
|
message ID2PathList {
|
|
|
|
int64 ID = 1;
|
|
|
|
repeated string Paths = 2;
|
|
|
|
}
|
2021-05-20 11:34:45 +08:00
|
|
|
|
2021-06-11 19:15:48 +08:00
|
|
|
message SegmentStartPosition {
|
2021-05-21 19:38:58 +08:00
|
|
|
internal.MsgPosition start_position = 1;
|
2021-06-11 19:15:48 +08:00
|
|
|
int64 segmentID = 2;
|
2021-05-21 19:38:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SaveBinlogPathsRequest {
|
|
|
|
common.MsgBase base = 1;
|
2021-05-20 11:34:45 +08:00
|
|
|
int64 segmentID = 2;
|
|
|
|
int64 collectionID = 3;
|
2021-05-26 12:09:03 +08:00
|
|
|
repeated ID2PathList field2BinlogPaths = 4;
|
2021-06-08 19:25:37 +08:00
|
|
|
repeated CheckPoint checkPoints = 5;
|
2021-06-15 11:06:42 +08:00
|
|
|
repeated SegmentStartPosition start_positions = 6;
|
2021-06-11 19:15:48 +08:00
|
|
|
bool flushed = 7;
|
2021-06-03 18:34:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message CheckPoint {
|
|
|
|
int64 segmentID = 1;
|
2021-06-04 11:45:45 +08:00
|
|
|
internal.MsgPosition position = 2;
|
|
|
|
int64 num_of_rows = 3;
|
2021-06-08 19:25:37 +08:00
|
|
|
|
2021-06-07 14:16:36 +08:00
|
|
|
}
|
|
|
|
|
2021-05-25 15:35:37 +08:00
|
|
|
message DataNodeTtMsg {
|
|
|
|
common.MsgBase base =1;
|
|
|
|
string channel_name = 2;
|
|
|
|
uint64 timestamp = 3;
|
|
|
|
}
|
|
|
|
|
2021-05-25 16:22:02 +08:00
|
|
|
enum ChannelWatchState {
|
|
|
|
Uncomplete = 0;
|
|
|
|
Complete = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelStatus {
|
|
|
|
string name = 1;
|
|
|
|
ChannelWatchState state=2;
|
2021-05-27 14:14:05 +08:00
|
|
|
int64 collectionID = 3;
|
2021-05-25 16:22:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DataNodeInfo {
|
|
|
|
string address = 1;
|
|
|
|
int64 version = 2;
|
|
|
|
repeated ChannelStatus channels = 3;
|
|
|
|
}
|
|
|
|
|
2021-06-07 09:47:36 +08:00
|
|
|
message SegmentBinlogs {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
repeated FieldBinlog fieldBinlogs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message FieldBinlog{
|
|
|
|
int64 fieldID = 1;
|
|
|
|
repeated string binlogs = 2;
|
|
|
|
}
|
|
|
|
|
2021-06-07 14:16:36 +08:00
|
|
|
message GetRecoveryInfoResponse {
|
2021-06-07 09:47:36 +08:00
|
|
|
common.Status status = 1;
|
2021-06-07 14:16:36 +08:00
|
|
|
repeated VchannelInfo channels = 2;
|
|
|
|
repeated SegmentBinlogs binlogs = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetRecoveryInfoRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
}
|
|
|
|
|
2021-06-15 11:06:42 +08:00
|
|
|
|