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";
|
2023-03-04 23:21:50 +08:00
|
|
|
import "msg.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 {
|
2022-10-10 15:55:22 +08:00
|
|
|
rpc GetComponentStates(milvus.GetComponentStatesRequest) returns (milvus.ComponentStates) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
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 GetPartitionStates(GetPartitionStatesRequest) returns (GetPartitionStatesResponse) {}
|
|
|
|
rpc GetSegmentInfo(GetSegmentInfoRequest) returns (GetSegmentInfoResponse) {}
|
2021-11-06 16:54:59 +08:00
|
|
|
rpc LoadBalance(LoadBalanceRequest) returns (common.Status) {}
|
2021-08-17 10:06:11 +08:00
|
|
|
|
2022-08-12 13:20:39 +08:00
|
|
|
rpc ShowConfigurations(internal.ShowConfigurationsRequest) returns (internal.ShowConfigurationsResponse){}
|
2021-08-17 10:06:11 +08:00
|
|
|
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
|
|
|
|
rpc GetMetrics(milvus.GetMetricsRequest) returns (milvus.GetMetricsResponse) {}
|
2022-03-31 16:39:29 +08:00
|
|
|
|
|
|
|
// https://wiki.lfaidata.foundation/display/MIL/MEP+23+--+Multiple+memory+replication+design
|
2022-04-06 14:57:31 +08:00
|
|
|
rpc GetReplicas(milvus.GetReplicasRequest) returns (milvus.GetReplicasResponse) {}
|
2022-03-31 16:39:29 +08:00
|
|
|
rpc GetShardLeaders(GetShardLeadersRequest) returns (GetShardLeadersResponse) {}
|
2022-10-18 13:39:26 +08:00
|
|
|
|
|
|
|
rpc CheckHealth(milvus.CheckHealthRequest) returns (milvus.CheckHealthResponse) {}
|
2023-01-30 10:19:48 +08:00
|
|
|
|
|
|
|
rpc CreateResourceGroup(milvus.CreateResourceGroupRequest) returns (common.Status) {}
|
|
|
|
rpc DropResourceGroup(milvus.DropResourceGroupRequest) returns (common.Status) {}
|
|
|
|
rpc TransferNode(milvus.TransferNodeRequest) returns (common.Status) {}
|
|
|
|
rpc TransferReplica(TransferReplicaRequest) returns (common.Status) {}
|
|
|
|
rpc ListResourceGroups(milvus.ListResourceGroupsRequest) returns (milvus.ListResourceGroupsResponse) {}
|
|
|
|
rpc DescribeResourceGroup(DescribeResourceGroupRequest) returns (DescribeResourceGroupResponse) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
service QueryNode {
|
2022-10-10 15:55:22 +08:00
|
|
|
rpc GetComponentStates(milvus.GetComponentStatesRequest) returns (milvus.ComponentStates) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
rpc GetTimeTickChannel(internal.GetTimeTickChannelRequest) returns(milvus.StringResponse) {}
|
|
|
|
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
|
|
|
|
|
|
|
|
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
|
2022-09-15 18:48:32 +08:00
|
|
|
rpc UnsubDmChannel(UnsubDmChannelRequest) returns (common.Status) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
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) {}
|
2022-04-27 10:41:46 +08:00
|
|
|
rpc SyncReplicaSegments(SyncReplicaSegmentsRequest) returns (common.Status) {}
|
2021-08-17 10:06:11 +08:00
|
|
|
|
2022-07-18 09:58:28 +08:00
|
|
|
rpc GetStatistics(GetStatisticsRequest) returns (internal.GetStatisticsResponse) {}
|
2022-04-02 14:15:31 +08:00
|
|
|
rpc Search(SearchRequest) returns (internal.SearchResults) {}
|
|
|
|
rpc Query(QueryRequest) returns (internal.RetrieveResults) {}
|
2022-03-30 12:03:27 +08:00
|
|
|
|
2022-08-03 01:12:33 +08:00
|
|
|
rpc ShowConfigurations(internal.ShowConfigurationsRequest) returns (internal.ShowConfigurationsResponse){}
|
2021-08-17 10:06:11 +08:00
|
|
|
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
|
|
|
|
rpc GetMetrics(milvus.GetMetricsRequest) returns (milvus.GetMetricsResponse) {}
|
2022-09-15 18:48:32 +08:00
|
|
|
|
|
|
|
rpc GetDataDistribution(GetDataDistributionRequest) returns (GetDataDistributionResponse) {}
|
|
|
|
rpc SyncDistribution(SyncDistributionRequest) returns (common.Status) {}
|
2021-03-12 14:22:09 +08:00
|
|
|
}
|
|
|
|
|
2021-12-15 16:53:12 +08:00
|
|
|
//--------------------QueryCoord grpc request and response proto------------------
|
2021-03-12 14:22:09 +08:00
|
|
|
message ShowCollectionsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-09-22 20:04:13 +08:00
|
|
|
// Not useful for now
|
2021-01-16 15:31:10 +08:00
|
|
|
int64 dbID = 2;
|
2021-08-02 22:39:25 +08:00
|
|
|
repeated int64 collectionIDs = 3;
|
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-08-02 22:39:25 +08:00
|
|
|
repeated int64 inMemory_percentages = 3;
|
2022-06-09 18:20:07 +08:00
|
|
|
repeated bool query_service_available = 4;
|
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;
|
2021-08-02 22:39:25 +08:00
|
|
|
repeated int64 partitionIDs = 4;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ShowPartitionsResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated int64 partitionIDs = 2;
|
2021-08-02 22:39:25 +08:00
|
|
|
repeated int64 inMemory_percentages = 3;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
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;
|
2022-03-25 11:13:25 +08:00
|
|
|
int32 replica_number = 5;
|
2022-10-17 18:01:25 +08:00
|
|
|
// fieldID -> indexID
|
|
|
|
map<int64, int64> field_indexID = 6;
|
2023-01-18 16:41:44 +08:00
|
|
|
bool refresh = 7;
|
2023-01-30 10:19:48 +08:00
|
|
|
// resource group names
|
|
|
|
repeated string resource_groups = 8;
|
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
|
|
|
}
|
|
|
|
|
2022-07-18 09:58:28 +08:00
|
|
|
message GetStatisticsRequest {
|
|
|
|
internal.GetStatisticsRequest req = 1;
|
|
|
|
repeated string dml_channels = 2;
|
|
|
|
repeated int64 segmentIDs = 3;
|
|
|
|
bool from_shard_leader = 4;
|
|
|
|
DataScope scope = 5; // All, Streaming, Historical
|
|
|
|
}
|
|
|
|
|
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;
|
2022-03-30 17:57:28 +08:00
|
|
|
int32 replica_number = 6;
|
2022-10-17 18:01:25 +08:00
|
|
|
// fieldID -> indexID
|
|
|
|
map<int64, int64> field_indexID = 7;
|
2023-01-18 16:41:44 +08:00
|
|
|
bool refresh = 8;
|
2023-01-30 10:19:48 +08:00
|
|
|
// resource group names
|
|
|
|
repeated string resource_groups = 9;
|
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 GetPartitionStatesRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 dbID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
repeated int64 partitionIDs = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
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-10-20 19:47:35 +08:00
|
|
|
repeated int64 segmentIDs = 2; // deprecated
|
|
|
|
int64 collectionID = 3;
|
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
|
|
|
}
|
|
|
|
|
2022-03-31 16:39:29 +08:00
|
|
|
message GetShardLeadersRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetShardLeadersResponse {
|
2022-04-01 16:15:29 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated ShardLeadersList shards = 2;
|
2022-03-31 16:39:29 +08:00
|
|
|
}
|
|
|
|
|
2022-04-01 16:15:29 +08:00
|
|
|
message ShardLeadersList { // All leaders of all replicas of one shard
|
2022-03-31 16:39:29 +08:00
|
|
|
string channel_name = 1;
|
2022-04-01 16:15:29 +08:00
|
|
|
repeated int64 node_ids = 2;
|
|
|
|
repeated string node_addrs = 3;
|
2022-03-31 16:39:29 +08:00
|
|
|
}
|
|
|
|
|
2021-12-15 16:53:12 +08:00
|
|
|
//-----------------query node grpc request and response proto----------------
|
2022-03-14 09:50:01 +08:00
|
|
|
message LoadMetaInfo {
|
|
|
|
LoadType load_type = 1;
|
|
|
|
int64 collectionID = 2;
|
2022-03-31 16:39:29 +08:00
|
|
|
repeated int64 partitionIDs = 3;
|
2022-03-14 09:50:01 +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;
|
2021-12-17 20:12:42 +08:00
|
|
|
repeated int64 partitionIDs = 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;
|
2022-03-14 09:50:01 +08:00
|
|
|
LoadMetaInfo load_meta = 8;
|
2022-04-20 16:15:41 +08:00
|
|
|
int64 replicaID = 9;
|
2022-06-16 12:00:10 +08:00
|
|
|
map<int64, data.SegmentInfo> segment_infos = 10;
|
2022-11-15 13:21:07 +08:00
|
|
|
// Deprecated
|
2022-08-29 16:32:57 +08:00
|
|
|
// for node down load balance, need to remove offline node in time after every watchDmChannel finish.
|
|
|
|
int64 offlineNodeID = 11;
|
2022-11-15 13:21:07 +08:00
|
|
|
int64 version = 12;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
2022-09-15 18:48:32 +08:00
|
|
|
message UnsubDmChannelRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 nodeID = 2;
|
|
|
|
int64 collectionID = 3;
|
|
|
|
string channel_name = 4;
|
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
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-09-07 11:35:18 +08:00
|
|
|
int64 num_of_rows = 7;
|
2021-10-22 14:31:13 +08:00
|
|
|
repeated data.FieldBinlog statslogs = 8;
|
2021-12-19 20:00:42 +08:00
|
|
|
repeated data.FieldBinlog deltalogs = 9;
|
2021-11-08 21:00:02 +08:00
|
|
|
repeated int64 compactionFrom = 10; // segmentIDs compacted from
|
2022-03-30 21:11:28 +08:00
|
|
|
repeated FieldIndexInfo index_infos = 11;
|
2021-12-30 19:09:33 +08:00
|
|
|
int64 segment_size = 12;
|
2022-04-20 16:15:41 +08:00
|
|
|
string insert_channel = 13;
|
2023-03-04 23:21:50 +08:00
|
|
|
msg.MsgPosition start_position = 14;
|
2021-12-30 19:09:33 +08:00
|
|
|
}
|
|
|
|
|
2022-03-30 21:11:28 +08:00
|
|
|
message FieldIndexInfo {
|
2021-12-30 19:09:33 +08:00
|
|
|
int64 fieldID =1;
|
2022-08-25 15:48:54 +08:00
|
|
|
// deprecated
|
2021-12-30 19:09:33 +08:00
|
|
|
bool enable_index = 2;
|
|
|
|
string index_name = 3;
|
|
|
|
int64 indexID = 4;
|
|
|
|
int64 buildID = 5;
|
|
|
|
repeated common.KeyValuePair index_params = 6;
|
|
|
|
repeated string index_file_paths = 7;
|
|
|
|
int64 index_size = 8;
|
2022-09-21 20:16:51 +08:00
|
|
|
int64 index_version = 9;
|
2022-10-14 17:51:24 +08:00
|
|
|
int64 num_rows = 10;
|
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-10-22 19:07:15 +08:00
|
|
|
int64 dst_nodeID = 2;
|
2021-06-15 12:41:40 +08:00
|
|
|
repeated SegmentLoadInfo infos = 3;
|
|
|
|
schema.CollectionSchema schema = 4;
|
2021-12-15 16:53:12 +08:00
|
|
|
int64 source_nodeID = 5;
|
|
|
|
int64 collectionID = 6;
|
2022-03-14 09:50:01 +08:00
|
|
|
LoadMetaInfo load_meta = 7;
|
2022-04-20 16:15:41 +08:00
|
|
|
int64 replicaID = 8;
|
2023-03-04 23:21:50 +08:00
|
|
|
repeated msg.MsgPosition delta_positions = 9;
|
2022-09-15 18:48:32 +08:00
|
|
|
int64 version = 10;
|
|
|
|
bool need_transfer = 11;
|
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;
|
2021-09-22 20:06:09 +08:00
|
|
|
// Not useful for now
|
2021-06-15 12:41:40 +08:00
|
|
|
int64 dbID = 3;
|
|
|
|
int64 collectionID = 4;
|
|
|
|
repeated int64 partitionIDs = 5;
|
|
|
|
repeated int64 segmentIDs = 6;
|
2022-06-17 17:38:12 +08:00
|
|
|
DataScope scope = 7; // All, Streaming, Historical
|
2022-09-15 18:48:32 +08:00
|
|
|
string shard = 8;
|
|
|
|
bool need_transfer = 11;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2022-03-30 12:03:27 +08:00
|
|
|
message SearchRequest {
|
2022-04-02 14:15:31 +08:00
|
|
|
internal.SearchRequest req = 1;
|
2022-07-06 15:06:21 +08:00
|
|
|
repeated string dml_channels = 2;
|
2022-03-30 12:03:27 +08:00
|
|
|
repeated int64 segmentIDs = 3;
|
2022-05-23 16:41:58 +08:00
|
|
|
bool from_shard_leader = 4;
|
|
|
|
DataScope scope = 5; // All, Streaming, Historical
|
2022-03-30 12:03:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message QueryRequest {
|
2022-04-02 14:15:31 +08:00
|
|
|
internal.RetrieveRequest req = 1;
|
2022-07-06 15:06:21 +08:00
|
|
|
repeated string dml_channels = 2;
|
2022-03-30 12:03:27 +08:00
|
|
|
repeated int64 segmentIDs = 3;
|
2022-05-23 16:41:58 +08:00
|
|
|
bool from_shard_leader = 4;
|
|
|
|
DataScope scope = 5; // All, Streaming, Historical
|
2022-03-30 12:03:27 +08:00
|
|
|
}
|
|
|
|
|
2022-04-27 10:41:46 +08:00
|
|
|
message SyncReplicaSegmentsRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string vchannel_name = 2;
|
|
|
|
repeated ReplicaSegmentsInfo replica_segments = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReplicaSegmentsInfo {
|
|
|
|
int64 node_id = 1;
|
|
|
|
int64 partition_id = 2;
|
|
|
|
repeated int64 segment_ids = 3;
|
2022-09-28 12:10:54 +08:00
|
|
|
repeated int64 versions = 4;
|
2022-04-27 10:41:46 +08:00
|
|
|
}
|
|
|
|
|
2021-12-15 16:53:12 +08:00
|
|
|
//----------------request auto triggered by QueryCoord-----------------
|
|
|
|
message HandoffSegmentsRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
repeated SegmentInfo segmentInfos = 2;
|
2022-06-29 23:26:19 +08:00
|
|
|
repeated int64 released_segments = 3;
|
2021-12-15 16:53:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message LoadBalanceRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
repeated int64 source_nodeIDs = 2;
|
|
|
|
TriggerCondition balance_reason = 3;
|
|
|
|
repeated int64 dst_nodeIDs = 4;
|
|
|
|
repeated int64 sealed_segmentIDs = 5;
|
2022-04-20 16:15:41 +08:00
|
|
|
int64 collectionID = 6;
|
2021-12-15 16:53:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//-------------------- internal meta proto------------------
|
2022-05-23 16:41:58 +08:00
|
|
|
|
|
|
|
enum DataScope {
|
|
|
|
UnKnown = 0;
|
|
|
|
All = 1;
|
|
|
|
Streaming = 2;
|
|
|
|
Historical = 3;
|
|
|
|
}
|
|
|
|
|
2021-12-15 16:53:12 +08:00
|
|
|
enum PartitionState {
|
|
|
|
NotExist = 0;
|
|
|
|
NotPresent = 1;
|
|
|
|
OnDisk = 2;
|
|
|
|
PartialInMemory = 3;
|
|
|
|
InMemory = 4;
|
|
|
|
PartialInGPU = 5;
|
|
|
|
InGPU = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum TriggerCondition {
|
|
|
|
UnKnowCondition = 0;
|
|
|
|
Handoff = 1;
|
|
|
|
LoadBalance = 2;
|
|
|
|
GrpcRequest = 3;
|
|
|
|
NodeDown = 4;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
2021-08-02 22:39:25 +08:00
|
|
|
enum LoadType {
|
2022-03-14 09:50:01 +08:00
|
|
|
UnKnownType = 0;
|
2021-12-15 16:53:12 +08:00
|
|
|
LoadPartition = 1;
|
2022-03-14 09:50:01 +08:00
|
|
|
LoadCollection = 2;
|
2021-08-02 22:39:25 +08:00
|
|
|
}
|
|
|
|
|
2021-12-15 16:53:12 +08:00
|
|
|
message DmChannelWatchInfo {
|
|
|
|
int64 collectionID = 1;
|
2021-12-21 11:57:39 +08:00
|
|
|
string dmChannel = 2;
|
|
|
|
int64 nodeID_loaded = 3;
|
2022-04-20 16:15:41 +08:00
|
|
|
int64 replicaID = 4;
|
2022-04-29 14:11:47 +08:00
|
|
|
repeated int64 node_ids = 5;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message QueryChannelInfo {
|
|
|
|
int64 collectionID = 1;
|
2021-12-15 16:53:12 +08:00
|
|
|
string query_channel = 2;
|
|
|
|
string query_result_channel = 3;
|
2021-10-22 19:07:15 +08:00
|
|
|
repeated SegmentInfo global_sealed_segments = 4;
|
2023-03-04 23:21:50 +08:00
|
|
|
msg.MsgPosition seek_position = 5;
|
2021-06-15 12:41:40 +08:00
|
|
|
}
|
|
|
|
|
2021-12-15 16:53:12 +08:00
|
|
|
message PartitionStates {
|
|
|
|
int64 partitionID = 1;
|
|
|
|
PartitionState state = 2;
|
|
|
|
int64 inMemory_percentage = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentInfo {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
2022-05-20 18:03:58 +08:00
|
|
|
// deprecated, check node_ids(NodeIds) field
|
2021-12-15 16:53:12 +08:00
|
|
|
int64 nodeID = 4;
|
|
|
|
int64 mem_size = 5;
|
|
|
|
int64 num_rows = 6;
|
|
|
|
string index_name = 7;
|
|
|
|
int64 indexID = 8;
|
|
|
|
string dmChannel = 9;
|
|
|
|
repeated int64 compactionFrom = 10;
|
|
|
|
bool createdByCompaction = 11;
|
|
|
|
common.SegmentState segment_state = 12;
|
2022-03-30 21:11:28 +08:00
|
|
|
repeated FieldIndexInfo index_infos = 13;
|
2022-03-25 11:13:25 +08:00
|
|
|
repeated int64 replica_ids = 14;
|
|
|
|
repeated int64 node_ids = 15;
|
2022-08-25 15:48:54 +08:00
|
|
|
bool enable_index = 16;
|
2022-10-26 16:49:31 +08:00
|
|
|
bool is_fake = 17;
|
2021-12-15 16:53:12 +08:00
|
|
|
}
|
|
|
|
|
2021-06-15 12:41:40 +08:00
|
|
|
message CollectionInfo {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated int64 partitionIDs = 2;
|
2021-08-02 22:39:25 +08:00
|
|
|
repeated PartitionStates partition_states = 3;
|
2021-12-21 11:57:39 +08:00
|
|
|
LoadType load_type = 4;
|
|
|
|
schema.CollectionSchema schema = 5;
|
|
|
|
repeated int64 released_partitionIDs = 6;
|
|
|
|
int64 inMemory_percentage = 7;
|
2022-03-25 11:13:25 +08:00
|
|
|
repeated int64 replica_ids = 8;
|
2022-04-01 16:15:29 +08:00
|
|
|
int32 replica_number = 9;
|
|
|
|
}
|
|
|
|
|
2022-01-17 17:37:37 +08:00
|
|
|
message UnsubscribeChannels {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated string channels = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UnsubscribeChannelInfo {
|
|
|
|
int64 nodeID = 1;
|
|
|
|
repeated UnsubscribeChannels collection_channels = 2;
|
|
|
|
}
|
|
|
|
|
2021-12-15 16:53:12 +08:00
|
|
|
//---- synchronize messages proto between QueryCoord and QueryNode -----
|
2021-10-26 15:18:22 +08:00
|
|
|
message SegmentChangeInfo {
|
|
|
|
int64 online_nodeID = 1;
|
|
|
|
repeated SegmentInfo online_segments = 2;
|
|
|
|
int64 offline_nodeID = 3;
|
|
|
|
repeated SegmentInfo offline_segments = 4;
|
|
|
|
}
|
|
|
|
|
2021-10-09 14:45:00 +08:00
|
|
|
message SealedSegmentsChangeInfo {
|
|
|
|
common.MsgBase base = 1;
|
2021-10-26 15:18:22 +08:00
|
|
|
repeated SegmentChangeInfo infos = 2;
|
2021-10-09 14:45:00 +08:00
|
|
|
}
|
2022-09-15 18:48:32 +08:00
|
|
|
|
|
|
|
message GetDataDistributionRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetDataDistributionResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
int64 nodeID = 2;
|
2022-09-20 19:24:51 +08:00
|
|
|
repeated SegmentVersionInfo segments = 3;
|
|
|
|
repeated ChannelVersionInfo channels = 4;
|
|
|
|
repeated LeaderView leader_views = 5;
|
2022-09-15 18:48:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message LeaderView {
|
|
|
|
int64 collection = 1;
|
|
|
|
string channel = 2;
|
2022-09-28 12:10:54 +08:00
|
|
|
map<int64, SegmentDist> segment_dist = 3;
|
2022-09-20 19:24:51 +08:00
|
|
|
repeated int64 growing_segmentIDs = 4;
|
2023-03-04 23:21:50 +08:00
|
|
|
map<int64, msg.MsgPosition> growing_segments = 5;
|
2022-09-15 18:48:32 +08:00
|
|
|
}
|
|
|
|
|
2022-09-28 12:10:54 +08:00
|
|
|
message SegmentDist {
|
|
|
|
int64 nodeID = 1;
|
|
|
|
int64 version = 2;
|
|
|
|
}
|
|
|
|
|
2022-09-15 18:48:32 +08:00
|
|
|
|
|
|
|
message SegmentVersionInfo {
|
|
|
|
int64 ID = 1;
|
|
|
|
int64 collection = 2;
|
|
|
|
int64 partition = 3;
|
|
|
|
string channel = 4;
|
|
|
|
int64 version = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ChannelVersionInfo {
|
|
|
|
string channel = 1;
|
|
|
|
int64 collection = 2;
|
|
|
|
int64 version = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum LoadStatus {
|
|
|
|
Invalid = 0;
|
|
|
|
Loading = 1;
|
|
|
|
Loaded = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CollectionLoadInfo {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated int64 released_partitions = 2;
|
|
|
|
int32 replica_number = 3;
|
|
|
|
LoadStatus status = 4;
|
2022-10-20 11:29:27 +08:00
|
|
|
map<int64, int64> field_indexID = 5;
|
2022-09-15 18:48:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message PartitionLoadInfo {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
int64 partitionID = 2;
|
|
|
|
int32 replica_number = 3;
|
|
|
|
LoadStatus status = 4;
|
2022-10-20 11:29:27 +08:00
|
|
|
map<int64, int64> field_indexID = 5;
|
2022-09-15 18:48:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message Replica {
|
|
|
|
int64 ID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
repeated int64 nodes = 3;
|
2023-01-30 10:19:48 +08:00
|
|
|
string resource_group = 4;
|
2022-09-15 18:48:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
enum SyncType {
|
|
|
|
Remove = 0;
|
|
|
|
Set = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncAction {
|
|
|
|
SyncType type = 1;
|
|
|
|
int64 partitionID = 2;
|
|
|
|
int64 segmentID = 3;
|
|
|
|
int64 nodeID = 4;
|
2022-09-28 12:10:54 +08:00
|
|
|
int64 version = 5;
|
2022-09-15 18:48:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SyncDistributionRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
string channel = 3;
|
|
|
|
repeated SyncAction actions = 4;
|
|
|
|
}
|
|
|
|
|
2023-01-30 10:19:48 +08:00
|
|
|
message ResourceGroup {
|
|
|
|
string name = 1;
|
|
|
|
int32 capacity = 2;
|
|
|
|
repeated int64 nodes = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// transfer `replicaNum` replicas in `collectionID` from `source_resource_group` to `target_resource_groups`
|
|
|
|
message TransferReplicaRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string source_resource_group = 2;
|
|
|
|
string target_resource_group = 3;
|
|
|
|
int64 collectionID = 4;
|
|
|
|
int64 num_replica = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeResourceGroupRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string resource_group = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeResourceGroupResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
ResourceGroupInfo resource_group = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ResourceGroupInfo {
|
|
|
|
string name = 1;
|
|
|
|
int32 capacity = 2;
|
|
|
|
int32 num_available_node = 3;
|
|
|
|
// collection id -> loaded replica num
|
|
|
|
map<int64, int32> num_loaded_replica = 4;
|
|
|
|
// collection id -> accessed other rg's node num
|
|
|
|
map<int64, int32> num_outgoing_node = 5;
|
|
|
|
// collection id -> be accessed node num by other rg
|
|
|
|
map<int64, int32> num_incoming_node = 6;
|
|
|
|
}
|