2020-10-24 18:04:57 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package milvus.proto.common;
|
|
|
|
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/commonpb";
|
2020-10-23 18:01:24 +08:00
|
|
|
|
|
|
|
enum ErrorCode {
|
2021-03-09 13:55:35 +08:00
|
|
|
ERROR_CODE_SUCCESS = 0;
|
|
|
|
ERROR_CODE_UNEXPECTED_ERROR = 1;
|
|
|
|
ERROR_CODE_CONNECT_FAILED = 2;
|
|
|
|
ERROR_CODE_PERMISSION_DENIED = 3;
|
|
|
|
ERROR_CODE_COLLECTION_NOT_EXISTS = 4;
|
|
|
|
ERROR_CODE_ILLEGAL_ARGUMENT = 5;
|
|
|
|
ERROR_CODE_ILLEGAL_DIMENSION = 7;
|
|
|
|
ERROR_CODE_ILLEGAL_INDEX_TYPE = 8;
|
|
|
|
ERROR_CODE_ILLEGAL_COLLECTION_NAME = 9;
|
|
|
|
ERROR_CODE_ILLEGAL_TOPK = 10;
|
|
|
|
ERROR_CODE_ILLEGAL_ROWRECORD = 11;
|
|
|
|
ERROR_CODE_ILLEGAL_VECTOR_ID = 12;
|
|
|
|
ERROR_CODE_ILLEGAL_SEARCH_RESULT = 13;
|
|
|
|
ERROR_CODE_FILE_NOT_FOUND = 14;
|
|
|
|
ERROR_CODE_META_FAILED = 15;
|
|
|
|
ERROR_CODE_CACHE_FAILED = 16;
|
|
|
|
ERROR_CODE_CANNOT_CREATE_FOLDER = 17;
|
|
|
|
ERROR_CODE_CANNOT_CREATE_FILE = 18;
|
|
|
|
ERROR_CODE_CANNOT_DELETE_FOLDER = 19;
|
|
|
|
ERROR_CODE_CANNOT_DELETE_FILE = 20;
|
|
|
|
ERROR_CODE_BUILD_INDEX_ERROR = 21;
|
|
|
|
ERROR_CODE_ILLEGAL_NLIST = 22;
|
|
|
|
ERROR_CODE_ILLEGAL_METRIC_TYPE = 23;
|
|
|
|
ERROR_CODE_OUT_OF_MEMORY = 24;
|
|
|
|
ERROR_CODE_INDEX_NOT_EXIST = 25;
|
2020-11-19 21:02:31 +08:00
|
|
|
|
|
|
|
// internal error code.
|
2021-03-09 13:55:35 +08:00
|
|
|
ERROR_CODE_DD_REQUEST_RACE = 1000;
|
2020-10-23 18:01:24 +08:00
|
|
|
}
|
|
|
|
|
2021-01-18 19:32:08 +08:00
|
|
|
enum IndexState {
|
2021-03-08 03:37:25 +08:00
|
|
|
INDEX_STATE_NONE = 0;
|
|
|
|
INDEX_STATE_UNISSUED = 1;
|
|
|
|
INDEX_STATE_IN_PROGRESS = 2;
|
|
|
|
INDEX_STATE_FINISHED = 3;
|
|
|
|
INDEX_STATE_FAILED = 4;
|
|
|
|
INDEX_STATE_DELETED = 5;
|
2021-01-18 19:32:08 +08:00
|
|
|
}
|
2020-11-19 21:02:31 +08:00
|
|
|
|
2021-02-03 18:55:00 +08:00
|
|
|
enum SegmentState {
|
|
|
|
SegmentNone = 0;
|
|
|
|
SegmentNotExist = 1;
|
|
|
|
SegmentGrowing = 2;
|
|
|
|
SegmentSealed = 3;
|
|
|
|
SegmentFlushed = 4;
|
|
|
|
}
|
|
|
|
|
2020-10-24 18:04:57 +08:00
|
|
|
message Empty{}
|
|
|
|
|
2020-10-23 18:01:24 +08:00
|
|
|
|
|
|
|
message Status {
|
|
|
|
ErrorCode error_code = 1;
|
|
|
|
string reason = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message KeyValuePair {
|
|
|
|
string key = 1;
|
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message Blob {
|
|
|
|
bytes value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-10-24 18:04:57 +08:00
|
|
|
message Address {
|
|
|
|
string ip = 1;
|
|
|
|
int64 port = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-16 15:06:19 +08:00
|
|
|
enum MsgType {
|
2021-03-10 14:45:35 +08:00
|
|
|
None = 0;
|
|
|
|
/* DEFINITION REQUESTS: COLLECTION */
|
|
|
|
CreateCollection = 100;
|
|
|
|
DropCollection = 101;
|
|
|
|
HasCollection = 102;
|
|
|
|
DescribeCollection = 103;
|
|
|
|
ShowCollections = 104;
|
|
|
|
GetSystemConfigs = 105;
|
|
|
|
LoadCollection = 106;
|
|
|
|
ReleaseCollection = 107;
|
|
|
|
|
|
|
|
/* DEFINITION REQUESTS: PARTITION */
|
|
|
|
CreatePartition = 200;
|
|
|
|
DropPartition = 201;
|
|
|
|
HasPartition = 202;
|
|
|
|
DescribePartition = 203;
|
|
|
|
ShowPartitions = 204;
|
|
|
|
LoadPartitions = 205;
|
|
|
|
ReleasePartitions = 206;
|
|
|
|
|
|
|
|
/* DEFINE REQUESTS: SEGMENT */
|
|
|
|
ShowSegments = 250;
|
|
|
|
DescribeSegment = 251;
|
|
|
|
|
|
|
|
/* DEFINITION REQUESTS: INDEX */
|
|
|
|
CreateIndex = 300;
|
|
|
|
DescribeIndex = 301;
|
|
|
|
DropIndex = 302;
|
|
|
|
|
|
|
|
/* MANIPULATION REQUESTS */
|
|
|
|
Insert = 400;
|
|
|
|
Delete = 401;
|
|
|
|
Flush = 402;
|
|
|
|
|
|
|
|
/* QUERY */
|
|
|
|
Search = 500;
|
|
|
|
SearchResult = 501;
|
|
|
|
GetIndexState = 502;
|
|
|
|
GetCollectionStatistics = 503;
|
|
|
|
GetPartitionStatistics = 504;
|
|
|
|
|
|
|
|
/* DATA SERVICE */
|
|
|
|
SegmentInfo = 600;
|
|
|
|
|
|
|
|
/* SYSTEM CONTROL */
|
|
|
|
TimeTick = 1200;
|
|
|
|
QueryNodeStats = 1201; // GOOSE TODO: Remove kQueryNodeStats
|
|
|
|
LoadIndex = 1202;
|
|
|
|
RequestID = 1203;
|
|
|
|
RequestTSO = 1204;
|
|
|
|
AllocateSegment = 1205;
|
|
|
|
SegmentStatistics = 1206;
|
|
|
|
SegmentFlushDone = 1207;
|
2021-01-16 15:06:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message MsgBase {
|
|
|
|
MsgType msg_type = 1;
|
|
|
|
int64 msgID = 2;
|
|
|
|
uint64 timestamp = 3;
|
|
|
|
int64 sourceID = 4;
|
|
|
|
}
|
|
|
|
|
2021-01-18 19:32:08 +08:00
|
|
|
|
|
|
|
// Don't Modify This. @czs
|
|
|
|
message MsgHeader {
|
|
|
|
common.MsgBase base = 1;
|
2021-01-21 09:55:25 +08:00
|
|
|
}
|