2021-01-14 14:24:14 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package milvus.proto.query;
|
|
|
|
|
2021-04-22 14:45:57 +08:00
|
|
|
option go_package = "github.com/milvus-io/milvus/internal/proto/querypb";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
|
|
|
import "common.proto";
|
2021-01-22 14:28:06 +08:00
|
|
|
import "milvus.proto";
|
2021-01-14 14:24:14 +08:00
|
|
|
import "internal.proto";
|
2021-02-06 17:37:10 +08:00
|
|
|
import "schema.proto";
|
2021-06-22 10:42:07 +08:00
|
|
|
import "data_coord.proto";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
2021-06-22 16:44:09 +08:00
|
|
|
service QueryCoord {
|
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){}
|
|
|
|
|
|
|
|
rpc ShowCollections(ShowCollectionsRequest) returns (ShowCollectionsResponse) {}
|
|
|
|
rpc ShowPartitions(ShowPartitionsRequest) returns (ShowPartitionsResponse) {}
|
|
|
|
|
|
|
|
rpc LoadPartitions(LoadPartitionsRequest) returns (common.Status) {}
|
|
|
|
rpc ReleasePartitions(ReleasePartitionsRequest) returns (common.Status) {}
|
|
|
|
rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
|
|
|
|
|
|
|
|
rpc CreateQueryChannel(CreateQueryChannelRequest) returns (CreateQueryChannelResponse) {}
|
|
|
|
rpc GetPartitionStates(GetPartitionStatesRequest) returns (GetPartitionStatesResponse) {}
|
|
|
|
rpc GetSegmentInfo(GetSegmentInfoRequest) returns (GetSegmentInfoResponse) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
service QueryNode {
|
|
|
|
rpc GetComponentStates(internal.GetComponentStatesRequest) returns (internal.ComponentStates) {}
|
|
|
|
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
|
|
|
|
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
|
|
|
|
|
|
|
|
rpc AddQueryChannel(AddQueryChannelRequest) returns (common.Status) {}
|
|
|
|
rpc RemoveQueryChannel(RemoveQueryChannelRequest) returns (common.Status) {}
|
|
|
|
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
|
|
|
|
rpc LoadSegments(LoadSegmentsRequest) returns (common.Status) {}
|
|
|
|
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc ReleasePartitions(ReleasePartitionsRequest) returns (common.Status) {}
|
|
|
|
rpc ReleaseSegments(ReleaseSegmentsRequest) returns (common.Status) {}
|
|
|
|
rpc GetSegmentInfo(GetSegmentInfoRequest) returns (GetSegmentInfoResponse) {}
|
|
|
|
}
|
|
|
|
|
2021-06-22 16:44:09 +08:00
|
|
|
//--------------------query coordinator proto------------------
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowCollectionsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-16 15:31:10 +08:00
|
|
|
int64 dbID = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowCollectionsResponse {
|
2021-01-16 15:31:10 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated int64 collectionIDs = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
message ShowPartitionsRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ShowPartitionsResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated int64 partitionIDs = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-14 14:24:14 +08:00
|
|
|
message LoadCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-16 15:31:10 +08:00
|
|
|
int64 dbID = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 collectionID = 3;
|
2021-02-06 17:37:10 +08:00
|
|
|
schema.CollectionSchema schema = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ReleaseCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-16 15:31:10 +08:00
|
|
|
int64 dbID = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
int64 collectionID = 3;
|
2021-06-19 11:45:09 +08:00
|
|
|
int64 nodeID = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
message LoadPartitionsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-16 15:31:10 +08:00
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
2021-06-15 12:41:40 +08:00
|
|
|
repeated int64 partitionIDs = 4;
|
|
|
|
schema.CollectionSchema schema = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
message ReleasePartitionsRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
repeated int64 partitionIDs = 4;
|
2021-06-19 11:45:09 +08:00
|
|
|
int64 nodeID = 5;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateQueryChannelRequest {
|
|
|
|
int64 collectionID = 1;
|
2021-06-18 10:33:58 +08:00
|
|
|
int64 proxyID = 2;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateQueryChannelResponse {
|
2021-01-16 15:31:10 +08:00
|
|
|
common.Status status = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
string request_channel = 2;
|
|
|
|
string result_channel = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetPartitionStatesRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
repeated int64 partitionIDs = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
enum PartitionState {
|
|
|
|
NotExist = 0;
|
|
|
|
NotPresent = 1;
|
2021-01-22 14:28:06 +08:00
|
|
|
OnDisk = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
PartialInMemory = 3;
|
|
|
|
InMemory = 4;
|
|
|
|
PartialInGPU = 5;
|
|
|
|
InGPU = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PartitionStates {
|
|
|
|
int64 partitionID = 1;
|
|
|
|
PartitionState state = 2;
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message GetPartitionStatesResponse {
|
2021-01-16 15:31:10 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated PartitionStates partition_descriptions = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
message GetSegmentInfoRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
repeated int64 segmentIDs = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
message SegmentInfo {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
int64 nodeID = 4;
|
|
|
|
int64 mem_size = 5;
|
|
|
|
int64 num_rows = 6;
|
|
|
|
string index_name = 7;
|
|
|
|
int64 indexID = 8;
|
|
|
|
string channelID = 9;
|
|
|
|
SegmentState segment_state = 10;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
message GetSegmentInfoResponse {
|
2021-01-16 15:31:10 +08:00
|
|
|
common.Status status = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
repeated SegmentInfo infos = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
//-----------------query node proto----------------
|
2021-03-12 14:22:09 +08:00
|
|
|
message AddQueryChannelRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
int64 nodeID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
string request_channelID = 4;
|
|
|
|
string result_channelID = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message RemoveQueryChannelRequest {
|
2021-06-15 12:41:40 +08:00
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 nodeID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
string request_channelID = 4;
|
|
|
|
string result_channelID = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
//message excludedSegmentInfo {
|
|
|
|
// int64 segmentID = 1;
|
|
|
|
// internal.MsgPosition pos = 2;
|
|
|
|
//}
|
|
|
|
|
|
|
|
//message WatchDmChannelInfo {
|
|
|
|
// string channelID = 1;
|
|
|
|
// internal.MsgPosition pos = 2;
|
|
|
|
//}
|
2021-03-11 10:08:46 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message WatchDmChannelsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
int64 nodeID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
int64 partitionID = 4;
|
2021-06-16 11:09:56 +08:00
|
|
|
repeated data.VchannelInfo infos = 5;
|
2021-06-15 12:41:40 +08:00
|
|
|
schema.CollectionSchema schema = 6;
|
2021-06-16 11:09:56 +08:00
|
|
|
repeated data.SegmentInfo exclude_infos = 7;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
enum TriggerCondition {
|
|
|
|
handoff = 0;
|
|
|
|
loadBalance = 1;
|
|
|
|
grpcRequest = 2;
|
|
|
|
nodeDown = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
//message FieldBinlogPath {
|
|
|
|
// int64 filedID = 1;
|
|
|
|
// repeated string binlog_path = 2;
|
|
|
|
//}
|
|
|
|
|
|
|
|
//used for handoff task
|
|
|
|
message SegmentLoadInfo {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 partitionID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
int64 dbID = 4;
|
|
|
|
int64 flush_time = 5;
|
2021-06-16 11:09:56 +08:00
|
|
|
repeated data.FieldBinlog binlog_paths = 6;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message LoadSegmentsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
int64 nodeID = 2;
|
|
|
|
repeated SegmentLoadInfo infos = 3;
|
|
|
|
schema.CollectionSchema schema = 4;
|
|
|
|
TriggerCondition load_condition = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
message ReleaseSegmentsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
int64 nodeID = 2;
|
|
|
|
int64 dbID = 3;
|
|
|
|
int64 collectionID = 4;
|
|
|
|
repeated int64 partitionIDs = 5;
|
|
|
|
repeated int64 segmentIDs = 6;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
//----------------etcd-----------------
|
|
|
|
enum SegmentState {
|
|
|
|
None = 0;
|
|
|
|
Growing = 1;
|
|
|
|
Frozen = 2;
|
|
|
|
sealing = 3;
|
|
|
|
sealed = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DmChannelInfo {
|
|
|
|
int64 nodeID_loaded = 1;
|
|
|
|
repeated string channelIDs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message QueryChannelInfo {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
string query_channelID = 2;
|
|
|
|
string query_result_channelID = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CollectionInfo {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated int64 partitionIDs = 2;
|
|
|
|
repeated DmChannelInfo channel_infos = 3;
|
2021-06-19 11:45:09 +08:00
|
|
|
bool load_collection = 4;
|
|
|
|
schema.CollectionSchema schema = 5;
|
2021-06-23 17:44:12 +08:00
|
|
|
repeated int64 released_partitionIDs = 6;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message HandoffSegments {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
repeated SegmentLoadInfo infos = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LoadBalanceSegmentInfo {
|
2021-02-04 11:40:14 +08:00
|
|
|
int64 segmentID = 1;
|
2021-06-15 12:41:40 +08:00
|
|
|
int64 partitionID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
int64 source_nodeID = 4;
|
|
|
|
int64 dst_nodeID = 5;
|
|
|
|
bool source_done = 6;
|
|
|
|
bool dst_done = 7;
|
|
|
|
bool valid_info = 8;
|
2021-02-04 11:40:14 +08:00
|
|
|
}
|
|
|
|
|
2021-06-19 11:45:09 +08:00
|
|
|
message LoadBalanceRequest {
|
2021-02-04 11:40:14 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-06-19 11:45:09 +08:00
|
|
|
repeated int64 source_nodeIDs = 2;
|
|
|
|
TriggerCondition balance_reason = 3;
|
2021-06-22 10:42:07 +08:00
|
|
|
}
|