milvus/internal/proto/common.proto

147 lines
3.2 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package milvus.proto.common;
option go_package="github.com/zilliztech/milvus-distributed/internal/proto/commonpb";
enum ErrorCode {
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;
// internal error code.
ERROR_CODE_DD_REQUEST_RACE = 1000;
}
enum IndexState {
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;
}
enum SegmentState {
SegmentNone = 0;
SegmentNotExist = 1;
SegmentGrowing = 2;
SegmentSealed = 3;
SegmentFlushed = 4;
}
message Empty{}
message Status {
ErrorCode error_code = 1;
string reason = 2;
}
message KeyValuePair {
string key = 1;
string value = 2;
}
message Blob {
bytes value = 1;
}
message Address {
string ip = 1;
int64 port = 2;
}
enum MsgType {
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;
}
message MsgBase {
MsgType msg_type = 1;
int64 msgID = 2;
uint64 timestamp = 3;
int64 sourceID = 4;
}
// Don't Modify This. @czs
message MsgHeader {
common.MsgBase base = 1;
}