mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
e8ec0424d8
Signed-off-by: GuoRentong <rentong.guo@zilliz.com>
355 lines
6.9 KiB
Protocol Buffer
355 lines
6.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package milvus.proto.internal;
|
|
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/internalpb";
|
|
|
|
import "common.proto";
|
|
import "service_msg.proto";
|
|
|
|
|
|
enum MsgType {
|
|
kNone = 0;
|
|
/* Definition Requests: collection */
|
|
kCreateCollection = 100;
|
|
kDropCollection = 101;
|
|
kHasCollection = 102;
|
|
kDescribeCollection = 103;
|
|
kShowCollections = 104;
|
|
kGetSysConfigs = 105;
|
|
|
|
/* Definition Requests: partition */
|
|
kCreatePartition = 200;
|
|
kDropPartition = 201;
|
|
kHasPartition = 202;
|
|
kDescribePartition = 203;
|
|
kShowPartitions = 204;
|
|
|
|
/* Definition Requests: Index */
|
|
kCreateIndex = 300;
|
|
kDescribeIndex = 301;
|
|
kDescribeIndexProgress = 302;
|
|
|
|
/* Manipulation Requests */
|
|
kInsert = 400;
|
|
kDelete = 401;
|
|
kFlush = 402;
|
|
|
|
/* Query */
|
|
kSearch = 500;
|
|
kSearchResult = 501;
|
|
|
|
/* System Control */
|
|
kTimeTick = 1200;
|
|
kQueryNodeStats = 1201;
|
|
kLoadIndex = 1202;
|
|
|
|
}
|
|
|
|
enum PeerRole {
|
|
|
|
Master = 0;
|
|
|
|
Reader = 1;
|
|
|
|
Writer = 2;
|
|
|
|
Proxy = 3;
|
|
|
|
}
|
|
|
|
message IDRequest {
|
|
int64 peerID = 1;
|
|
PeerRole role = 2;
|
|
uint32 count = 3;
|
|
}
|
|
|
|
message IDResponse {
|
|
common.Status status = 1;
|
|
int64 ID = 2;
|
|
uint32 count = 3;
|
|
}
|
|
|
|
message TsoRequest {
|
|
int64 peerID = 1;
|
|
PeerRole role = 2;
|
|
uint32 count = 3;
|
|
}
|
|
|
|
message TsoResponse {
|
|
common.Status status = 1;
|
|
uint64 timestamp = 2;
|
|
uint32 count = 3;
|
|
}
|
|
|
|
message SegIDRequest {
|
|
uint32 count = 1;
|
|
int32 channelID = 2;
|
|
string coll_name = 3;
|
|
string partition_tag = 4;
|
|
}
|
|
|
|
message AssignSegIDRequest {
|
|
int64 peerID = 1;
|
|
PeerRole role = 2;
|
|
repeated SegIDRequest per_channel_req = 3;
|
|
}
|
|
|
|
message SegIDAssignment {
|
|
int64 segID = 1;
|
|
int32 channelID = 2;
|
|
uint32 count = 3;
|
|
string coll_name = 4;
|
|
string partition_tag = 5;
|
|
uint64 expire_time = 6;
|
|
common.Status status = 7;
|
|
}
|
|
|
|
message AssignSegIDResponse {
|
|
repeated SegIDAssignment per_channel_assignment = 1;
|
|
}
|
|
|
|
message CreateCollectionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 collectionID = 2;
|
|
int64 reqID = 3;
|
|
uint64 timestamp = 4;
|
|
int64 proxyID = 5;
|
|
common.Blob schema = 6;
|
|
}
|
|
|
|
|
|
message DropCollectionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 collectionID = 2;
|
|
int64 reqID = 3;
|
|
uint64 timestamp = 4;
|
|
int64 proxyID = 5;
|
|
service.CollectionName collection_name = 6;
|
|
}
|
|
|
|
|
|
message HasCollectionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
service.CollectionName collection_name = 5;
|
|
}
|
|
|
|
|
|
message DescribeCollectionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
service.CollectionName collection_name = 5;
|
|
}
|
|
|
|
|
|
message ShowCollectionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
}
|
|
|
|
|
|
message CreatePartitionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 collectionID = 2;
|
|
int64 partitionID = 3;
|
|
int64 reqID = 4;
|
|
uint64 timestamp = 5;
|
|
int64 proxyID = 6;
|
|
service.PartitionName partition_name = 7;
|
|
}
|
|
|
|
|
|
message DropPartitionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 collectionID = 2;
|
|
int64 partitionID = 3;
|
|
int64 reqID = 4;
|
|
uint64 timestamp = 5;
|
|
int64 proxyID = 6;
|
|
service.PartitionName partition_name = 7;
|
|
}
|
|
|
|
|
|
message HasPartitionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
service.PartitionName partition_name = 5;
|
|
}
|
|
|
|
|
|
message DescribePartitionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
service.PartitionName partition_name = 5;
|
|
}
|
|
|
|
|
|
message ShowPartitionRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
service.CollectionName collection_name = 5;
|
|
}
|
|
|
|
|
|
message InsertRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
string collection_name = 3;
|
|
string partition_tag = 4;
|
|
int64 segmentID = 5;
|
|
int64 channelID = 6;
|
|
int64 proxyID = 7;
|
|
repeated uint64 timestamps = 8;
|
|
repeated int64 rowIDs = 9;
|
|
repeated common.Blob row_data = 10;
|
|
}
|
|
|
|
|
|
message DeleteRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
string collection_name = 3;
|
|
int64 channelID = 4;
|
|
int64 proxyID = 5;
|
|
repeated uint64 timestamps = 6;
|
|
repeated int64 primary_keys = 7;
|
|
}
|
|
|
|
|
|
message SearchRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
int64 proxyID = 3;
|
|
uint64 timestamp = 4;
|
|
int64 result_channelID = 5;
|
|
common.Blob query = 6;
|
|
|
|
}
|
|
|
|
/**
|
|
* @brief Request of DescribePartition
|
|
*/
|
|
message SysConfigRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
int64 proxyID = 3;
|
|
uint64 timestamp = 4;
|
|
repeated string keys = 5;
|
|
repeated string key_prefixes = 6;
|
|
}
|
|
|
|
|
|
message SearchResult {
|
|
MsgType msg_type = 1;
|
|
common.Status status = 2;
|
|
int64 reqID = 3;
|
|
int64 proxyID = 4;
|
|
int64 query_nodeID = 5;
|
|
uint64 timestamp = 6;
|
|
int64 result_channelID = 7;
|
|
repeated bytes hits = 8;
|
|
string metric_type = 9;
|
|
}
|
|
|
|
message TimeTickMsg {
|
|
MsgType msg_type = 1;
|
|
int64 peerID = 2;
|
|
uint64 timestamp = 3;
|
|
}
|
|
|
|
message FlushMsg {
|
|
MsgType msg_type = 1;
|
|
int64 segmentID = 2;
|
|
uint64 timestamp = 3;
|
|
}
|
|
|
|
|
|
message Key2Seg {
|
|
int64 rowID = 1;
|
|
int64 primary_key = 2;
|
|
uint64 timestamp = 3;
|
|
bool is_valid = 4;
|
|
repeated int64 segmentIDs = 5;
|
|
}
|
|
|
|
|
|
message Key2SegMsg {
|
|
int64 reqID = 1;
|
|
repeated Key2Seg key2seg = 2;
|
|
}
|
|
|
|
message LoadIndex {
|
|
MsgType msg_type = 1;
|
|
int64 segmentID = 2;
|
|
string fieldName = 3;
|
|
int64 fieldID = 4;
|
|
repeated string index_paths = 5;
|
|
repeated common.KeyValuePair index_params = 6;
|
|
}
|
|
|
|
message IndexStats {
|
|
repeated common.KeyValuePair index_params = 1;
|
|
int64 num_related_segments = 2;
|
|
}
|
|
|
|
message FieldStats {
|
|
int64 collectionID = 1;
|
|
int64 fieldID = 2;
|
|
repeated IndexStats index_stats = 3;
|
|
}
|
|
|
|
message SegmentStats {
|
|
int64 segmentID = 1;
|
|
int64 memory_size = 2;
|
|
int64 num_rows = 3;
|
|
bool recently_modified = 4;
|
|
}
|
|
|
|
message QueryNodeStats {
|
|
MsgType msg_type = 1;
|
|
int64 peerID = 2;
|
|
repeated SegmentStats seg_stats = 3;
|
|
repeated FieldStats field_stats = 4;
|
|
}
|
|
|
|
message CreateIndexRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
string collection_name = 5;
|
|
string field_name = 6;
|
|
repeated common.KeyValuePair extra_params = 7;
|
|
}
|
|
|
|
message DescribeIndexRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
string collection_name = 5;
|
|
string field_name = 6;
|
|
repeated common.KeyValuePair extra_params = 7;
|
|
}
|
|
|
|
message DescribeIndexProgressRequest {
|
|
MsgType msg_type = 1;
|
|
int64 reqID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 proxyID = 4;
|
|
string collection_name = 5;
|
|
string field_name = 6;
|
|
repeated common.KeyValuePair extra_params = 7;
|
|
}
|