common.proto 3.9 KB
Newer Older
1 2 3
syntax = "proto3";

package milvus.proto.common;
X
Xiangyu Wang 已提交
4
option go_package="github.com/milvus-io/milvus/internal/proto/commonpb";
5

G
godchen 已提交
6

7
enum ErrorCode {
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
    Success = 0;
    UnexpectedError = 1;
    ConnectFailed = 2;
    PermissionDenied = 3;
    CollectionNotExists = 4;
    IllegalArgument = 5;
    IllegalDimension = 7;
    IllegalIndexType = 8;
    IllegalCollectionName = 9;
    IllegalTOPK = 10;
    IllegalRowRecord = 11;
    IllegalVectorID = 12;
    IllegalSearchResult = 13;
    FileNotFound = 14;
    MetaFailed = 15;
    CacheFailed = 16;
    CannotCreateFolder = 17;
    CannotCreateFile = 18;
    CannotDeleteFolder = 19;
    CannotDeleteFile = 20;
    BuildIndexError = 21;
    IllegalNLIST = 22;
    IllegalMetricType = 23;
    OutOfMemory = 24;
    IndexNotExist = 25;
33
    EmptyCollection = 26;
Z
zhenshan.cao 已提交
34 35

    // internal error code.
36
    DDRequestRace = 1000;
37 38
}

39
enum IndexState {
T
ThreadDao 已提交
40 41 42 43 44
    IndexStateNone = 0;
    Unissued = 1;
    InProgress = 2;
    Finished = 3;
    Failed = 4;
45
}
Z
zhenshan.cao 已提交
46

Z
zhenshan.cao 已提交
47
enum SegmentState {
T
ThreadDao 已提交
48 49 50 51
    SegmentStateNone = 0;
    NotExist = 1;
    Growing = 2;
    Sealed = 3;
S
sunby 已提交
52 53
    Flushed = 4;
    Flushing = 5;
C
congqixia 已提交
54
    Dropped = 6;
Z
zhenshan.cao 已提交
55 56
}

57 58 59 60 61 62 63 64 65 66
message Status {
    ErrorCode error_code = 1;
    string reason = 2;
}

message KeyValuePair {
    string key = 1;
    string value = 2;
}

67 68 69 70 71
message KeyDataPair {
    string key = 1;
    bytes data = 2;
}

72 73 74 75
message Blob {
    bytes value = 1;
}

76 77 78 79 80
message Address {
  string ip = 1;
  int64 port = 2;
}

81
enum MsgType {
T
ThreadDao 已提交
82
    Undefined = 0;
83 84 85 86 87 88 89 90 91
    /* DEFINITION REQUESTS: COLLECTION */
    CreateCollection = 100;
    DropCollection = 101;
    HasCollection = 102;
    DescribeCollection = 103;
    ShowCollections = 104;
    GetSystemConfigs = 105;
    LoadCollection = 106;
    ReleaseCollection = 107;
Y
Yusup 已提交
92 93 94 95
    CreateAlias = 108;
    DropAlias = 109;
    AlterAlias = 110;

96 97 98 99 100 101 102 103 104 105 106 107 108

    /* DEFINITION REQUESTS: PARTITION */
    CreatePartition = 200;
    DropPartition = 201;
    HasPartition = 202;
    DescribePartition = 203;
    ShowPartitions = 204;
    LoadPartitions = 205;
    ReleasePartitions = 206;

    /* DEFINE REQUESTS: SEGMENT */
    ShowSegments = 250;
    DescribeSegment = 251;
109 110 111 112
    LoadSegments = 252;
    ReleaseSegments = 253;
    HandoffSegments = 254;
    LoadBalanceSegments = 255;
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

    /* DEFINITION REQUESTS: INDEX */
    CreateIndex = 300;
    DescribeIndex = 301;
    DropIndex = 302;

    /* MANIPULATION REQUESTS */
    Insert = 400;
    Delete = 401;
    Flush = 402;

    /* QUERY */
    Search = 500;
    SearchResult = 501;
    GetIndexState = 502;
128 129 130
    GetIndexBuildProgress = 503;
    GetCollectionStatistics = 504;
    GetPartitionStatistics = 505;
Y
yukun 已提交
131 132
    Retrieve = 506;
    RetrieveResult = 507;
133 134 135 136
    WatchDmChannels = 508;
    RemoveDmChannels = 509;
    WatchQueryChannels = 510;
    RemoveQueryChannels = 511;
137
    SealedSegmentsChangeInfo = 512;
138
    WatchDeltaChannels = 513;
139 140 141

    /* DATA SERVICE */
    SegmentInfo = 600;
142
    SystemInfo = 601;
143
    GetRecoveryInfo = 602;
144
    GetSegmentState = 603;
145 146 147 148 149 150 151 152 153 154

    /* SYSTEM CONTROL */
    TimeTick = 1200;
    QueryNodeStats = 1201; // GOOSE TODO: Remove kQueryNodeStats
    LoadIndex = 1202;
    RequestID = 1203;
    RequestTSO = 1204;
    AllocateSegment = 1205;
    SegmentStatistics = 1206;
    SegmentFlushDone = 1207;
S
sunby 已提交
155 156

    DataNodeTt = 1208;
157 158 159 160 161 162 163 164 165
}

message MsgBase {
    MsgType msg_type = 1;
    int64  msgID = 2;
    uint64 timestamp = 3;
    int64 sourceID = 4;
}

166 167 168 169
enum DslType {
    Dsl = 0;
    BoolExprV1 = 1;
}
170 171 172 173

// Don't Modify This. @czs
message MsgHeader {
    common.MsgBase base = 1;
174
}
175 176 177 178 179

// Don't Modify This. @czs
message DMLMsgHeader {
    common.MsgBase base = 1;
    string shardName = 2;
180
}
181 182 183 184 185 186

enum CompactionState {
  UndefiedState = 0;
  Executing = 1;
  Completed = 2;
}
187 188 189 190 191 192 193 194

enum ConsistencyLevel {
    Strong = 0;
    Session = 1; // default in PyMilvus
    Bounded = 2;
    Eventually = 3;
    Customized = 4; // Users pass their own `guarantee_timestamp`.
}
G
groot 已提交
195 196 197 198 199 200 201

enum ImportState {
    ImportPending = 0;
    ImportExecuting = 1;
    ImportCompleted = 2;
    ImportFailed = 3;
}