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 {
|
|
|
|
SUCCESS = 0;
|
|
|
|
UNEXPECTED_ERROR = 1;
|
|
|
|
CONNECT_FAILED = 2;
|
|
|
|
PERMISSION_DENIED = 3;
|
|
|
|
COLLECTION_NOT_EXISTS = 4;
|
|
|
|
ILLEGAL_ARGUMENT = 5;
|
|
|
|
ILLEGAL_DIMENSION = 7;
|
|
|
|
ILLEGAL_INDEX_TYPE = 8;
|
|
|
|
ILLEGAL_COLLECTION_NAME = 9;
|
|
|
|
ILLEGAL_TOPK = 10;
|
|
|
|
ILLEGAL_ROWRECORD = 11;
|
|
|
|
ILLEGAL_VECTOR_ID = 12;
|
|
|
|
ILLEGAL_SEARCH_RESULT = 13;
|
|
|
|
FILE_NOT_FOUND = 14;
|
|
|
|
META_FAILED = 15;
|
|
|
|
CACHE_FAILED = 16;
|
|
|
|
CANNOT_CREATE_FOLDER = 17;
|
|
|
|
CANNOT_CREATE_FILE = 18;
|
|
|
|
CANNOT_DELETE_FOLDER = 19;
|
|
|
|
CANNOT_DELETE_FILE = 20;
|
|
|
|
BUILD_INDEX_ERROR = 21;
|
|
|
|
ILLEGAL_NLIST = 22;
|
|
|
|
ILLEGAL_METRIC_TYPE = 23;
|
|
|
|
OUT_OF_MEMORY = 24;
|
2021-03-05 20:41:34 +08:00
|
|
|
INDEX_NOT_EXIST = 25;
|
2020-11-19 21:02:31 +08:00
|
|
|
|
|
|
|
// internal error code.
|
|
|
|
DD_REQUEST_RACE = 1000;
|
2020-10-23 18:01:24 +08:00
|
|
|
}
|
|
|
|
|
2021-01-18 19:32:08 +08:00
|
|
|
enum IndexState {
|
|
|
|
NONE = 0;
|
|
|
|
UNISSUED = 1;
|
|
|
|
INPROGRESS = 2;
|
|
|
|
FINISHED = 3;
|
|
|
|
FAILED = 4;
|
2021-02-20 10:14:03 +08:00
|
|
|
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 {
|
|
|
|
kNone = 0;
|
|
|
|
/* Definition Requests: collection */
|
|
|
|
kCreateCollection = 100;
|
|
|
|
kDropCollection = 101;
|
|
|
|
kHasCollection = 102;
|
|
|
|
kDescribeCollection = 103;
|
|
|
|
kShowCollections = 104;
|
|
|
|
kGetSysConfigs = 105;
|
2021-02-04 15:31:02 +08:00
|
|
|
kLoadCollection = 106;
|
|
|
|
kReleaseCollection = 107;
|
2021-01-16 15:06:19 +08:00
|
|
|
|
|
|
|
/* Definition Requests: partition */
|
|
|
|
kCreatePartition = 200;
|
|
|
|
kDropPartition = 201;
|
|
|
|
kHasPartition = 202;
|
|
|
|
kDescribePartition = 203;
|
|
|
|
kShowPartitions = 204;
|
2021-02-04 15:31:02 +08:00
|
|
|
kLoadPartition = 205;
|
|
|
|
kReleasePartition = 206;
|
2021-01-16 15:06:19 +08:00
|
|
|
|
2021-01-22 11:44:02 +08:00
|
|
|
/* Define Requests: segment */
|
|
|
|
kShowSegment = 250;
|
|
|
|
kDescribeSegment = 251;
|
|
|
|
|
2021-01-16 15:06:19 +08:00
|
|
|
/* Definition Requests: Index */
|
|
|
|
kCreateIndex = 300;
|
|
|
|
kDescribeIndex = 301;
|
2021-02-20 15:38:44 +08:00
|
|
|
kDropIndex = 302;
|
2021-01-16 15:06:19 +08:00
|
|
|
|
|
|
|
/* Manipulation Requests */
|
|
|
|
kInsert = 400;
|
|
|
|
kDelete = 401;
|
|
|
|
kFlush = 402;
|
|
|
|
|
|
|
|
/* Query */
|
|
|
|
kSearch = 500;
|
|
|
|
kSearchResult = 501;
|
2021-01-18 21:39:56 +08:00
|
|
|
kGetIndexState = 502;
|
|
|
|
kGetCollectionStatistics = 503;
|
|
|
|
kGetPartitionStatistics = 504;
|
2021-01-16 15:06:19 +08:00
|
|
|
|
2021-01-24 20:26:35 +08:00
|
|
|
/* Data Service */
|
|
|
|
kSegmentInfo = 600;
|
|
|
|
|
2021-01-16 15:06:19 +08:00
|
|
|
/* System Control */
|
|
|
|
kTimeTick = 1200;
|
2021-01-21 09:55:25 +08:00
|
|
|
kQueryNodeStats = 1201; // GOOSE TODO: Remove kQueryNodeStats
|
2021-01-16 15:06:19 +08:00
|
|
|
kLoadIndex = 1202;
|
2021-01-18 19:32:08 +08:00
|
|
|
kRequestID = 1203;
|
|
|
|
kRequestTSO = 1204;
|
2021-01-19 12:10:49 +08:00
|
|
|
kAllocateSegment = 1205;
|
2021-01-21 09:55:25 +08:00
|
|
|
kSegmentStatistics = 1206;
|
2021-01-22 19:36:09 +08:00
|
|
|
kSegmentFlushDone = 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
|
|
|
}
|