common.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. syntax = "proto3";
  2. package common;
  3. option java_multiple_files = true;
  4. option java_package = "io.milvus.grpc";
  5. option java_outer_classname = "CommonProto";
  6. option java_generate_equals_and_hash = true;
  7. enum ErrorCode {
  8. Success = 0;
  9. UnexpectedError = 1;
  10. ConnectFailed = 2;
  11. PermissionDenied = 3;
  12. CollectionNotExists = 4;
  13. IllegalArgument = 5;
  14. IllegalDimension = 7;
  15. IllegalIndexType = 8;
  16. IllegalCollectionName = 9;
  17. IllegalTOPK = 10;
  18. IllegalRowRecord = 11;
  19. IllegalVectorID = 12;
  20. IllegalSearchResult = 13;
  21. FileNotFound = 14;
  22. MetaFailed = 15;
  23. CacheFailed = 16;
  24. CannotCreateFolder = 17;
  25. CannotCreateFile = 18;
  26. CannotDeleteFolder = 19;
  27. CannotDeleteFile = 20;
  28. BuildIndexError = 21;
  29. IllegalNLIST = 22;
  30. IllegalMetricType = 23;
  31. OutOfMemory = 24;
  32. IndexNotExist = 25;
  33. EmptyCollection = 26;
  34. // internal error code.
  35. DDRequestRace = 1000;
  36. }
  37. enum IndexState {
  38. IndexStateNone = 0;
  39. Unissued = 1;
  40. InProgress = 2;
  41. Finished = 3;
  42. Failed = 4;
  43. }
  44. enum SegmentState {
  45. SegmentStateNone = 0;
  46. NotExist = 1;
  47. Growing = 2;
  48. Sealed = 3;
  49. Flushed = 4;
  50. Flushing = 5;
  51. Dropped = 6;
  52. }
  53. message Status {
  54. ErrorCode error_code = 1;
  55. string reason = 2;
  56. }
  57. message KeyValuePair {
  58. string key = 1;
  59. string value = 2;
  60. }
  61. message KeyDataPair {
  62. string key = 1;
  63. bytes data = 2;
  64. }
  65. message Blob {
  66. bytes value = 1;
  67. }
  68. message Address {
  69. string ip = 1;
  70. int64 port = 2;
  71. }
  72. enum MsgType {
  73. Undefined = 0;
  74. /* DEFINITION REQUESTS: COLLECTION */
  75. CreateCollection = 100;
  76. DropCollection = 101;
  77. HasCollection = 102;
  78. DescribeCollection = 103;
  79. ShowCollections = 104;
  80. GetSystemConfigs = 105;
  81. LoadCollection = 106;
  82. ReleaseCollection = 107;
  83. CreateAlias = 108;
  84. DropAlias = 109;
  85. AlterAlias = 110;
  86. /* DEFINITION REQUESTS: PARTITION */
  87. CreatePartition = 200;
  88. DropPartition = 201;
  89. HasPartition = 202;
  90. DescribePartition = 203;
  91. ShowPartitions = 204;
  92. LoadPartitions = 205;
  93. ReleasePartitions = 206;
  94. /* DEFINE REQUESTS: SEGMENT */
  95. ShowSegments = 250;
  96. DescribeSegment = 251;
  97. LoadSegments = 252;
  98. ReleaseSegments = 253;
  99. HandoffSegments = 254;
  100. LoadBalanceSegments = 255;
  101. /* DEFINITION REQUESTS: INDEX */
  102. CreateIndex = 300;
  103. DescribeIndex = 301;
  104. DropIndex = 302;
  105. /* MANIPULATION REQUESTS */
  106. Insert = 400;
  107. Delete = 401;
  108. Flush = 402;
  109. /* QUERY */
  110. Search = 500;
  111. SearchResult = 501;
  112. GetIndexState = 502;
  113. GetIndexBuildProgress = 503;
  114. GetCollectionStatistics = 504;
  115. GetPartitionStatistics = 505;
  116. Retrieve = 506;
  117. RetrieveResult = 507;
  118. WatchDmChannels = 508;
  119. RemoveDmChannels = 509;
  120. WatchQueryChannels = 510;
  121. RemoveQueryChannels = 511;
  122. SealedSegmentsChangeInfo = 512;
  123. WatchDeltaChannels = 513;
  124. /* DATA SERVICE */
  125. SegmentInfo = 600;
  126. SystemInfo = 601;
  127. /* SYSTEM CONTROL */
  128. TimeTick = 1200;
  129. QueryNodeStats = 1201; // GOOSE TODO: Remove kQueryNodeStats
  130. LoadIndex = 1202;
  131. RequestID = 1203;
  132. RequestTSO = 1204;
  133. AllocateSegment = 1205;
  134. SegmentStatistics = 1206;
  135. SegmentFlushDone = 1207;
  136. DataNodeTt = 1208;
  137. }
  138. message MsgBase {
  139. MsgType msg_type = 1;
  140. int64 msgID = 2;
  141. uint64 timestamp = 3;
  142. int64 sourceID = 4;
  143. }
  144. enum DslType {
  145. Dsl = 0;
  146. BoolExprV1 = 1;
  147. }
  148. // Don't Modify This. @czs
  149. message MsgHeader {
  150. common.MsgBase base = 1;
  151. }
  152. // Don't Modify This. @czs
  153. message DMLMsgHeader {
  154. common.MsgBase base = 1;
  155. string shardName = 2;
  156. }
  157. enum CompactionState {
  158. UndefiedState = 0;
  159. Executing = 1;
  160. Completed = 2;
  161. }