@zilliz/milvus2-sdk-node 2.1.2 → 2.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +29 -40
  2. package/dist/milvus/Collection.d.ts +65 -11
  3. package/dist/milvus/Collection.js +111 -35
  4. package/dist/milvus/Collection.js.map +1 -1
  5. package/dist/milvus/Data.d.ts +71 -13
  6. package/dist/milvus/Data.js +153 -50
  7. package/dist/milvus/Data.js.map +1 -1
  8. package/dist/milvus/MilvusIndex.d.ts +5 -1
  9. package/dist/milvus/MilvusIndex.js +11 -9
  10. package/dist/milvus/MilvusIndex.js.map +1 -1
  11. package/dist/milvus/Partition.d.ts +10 -6
  12. package/dist/milvus/Partition.js +15 -11
  13. package/dist/milvus/Partition.js.map +1 -1
  14. package/dist/milvus/User.d.ts +3 -3
  15. package/dist/milvus/User.js +10 -10
  16. package/dist/milvus/User.js.map +1 -1
  17. package/dist/milvus/const/ErrorReason.d.ts +4 -1
  18. package/dist/milvus/const/ErrorReason.js +3 -0
  19. package/dist/milvus/const/ErrorReason.js.map +1 -1
  20. package/dist/milvus/index.d.ts +3 -1
  21. package/dist/milvus/index.js +33 -5
  22. package/dist/milvus/index.js.map +1 -1
  23. package/dist/milvus/types/Collection.d.ts +16 -8
  24. package/dist/milvus/types/Common.d.ts +12 -1
  25. package/dist/milvus/types/Common.js +10 -1
  26. package/dist/milvus/types/Common.js.map +1 -1
  27. package/dist/milvus/types/Data.d.ts +22 -8
  28. package/dist/milvus/types/Index.d.ts +7 -6
  29. package/dist/milvus/types/Partition.d.ts +5 -4
  30. package/dist/milvus/types/Response.d.ts +45 -1
  31. package/dist/milvus/types/Response.js.map +1 -1
  32. package/dist/milvus/types/Search.d.ts +13 -10
  33. package/dist/milvus/types/User.d.ts +6 -3
  34. package/dist/milvus/types.js +5 -1
  35. package/dist/milvus/types.js.map +1 -1
  36. package/dist/milvus/utils/Format.js +14 -10
  37. package/dist/milvus/utils/Format.js.map +1 -1
  38. package/dist/milvus/utils/index.d.ts +1 -1
  39. package/dist/proto/proto/common.proto +71 -33
  40. package/dist/proto/proto/google/protobuf/descriptor.proto +17 -19
  41. package/dist/proto/proto/milvus.proto +293 -82
  42. package/dist/proto/proto/schema.proto +10 -2
  43. package/dist/sdk.json +1 -1
  44. package/dist/utils/index.d.ts +1 -1
  45. package/dist/utils/index.js +12 -7
  46. package/dist/utils/index.js.map +1 -1
  47. package/package.json +10 -10
@@ -1,7 +1,7 @@
1
1
  syntax = "proto3";
2
2
  package milvus.proto.milvus;
3
3
 
4
- option go_package = "github.com/milvus-io/milvus/internal/proto/milvuspb";
4
+ option go_package = "github.com/milvus-io/milvus-proto/go-api/milvuspb";
5
5
 
6
6
  option java_multiple_files = true;
7
7
  option java_package = "io.milvus.grpc";
@@ -21,6 +21,7 @@ service MilvusService {
21
21
  rpc DescribeCollection(DescribeCollectionRequest) returns (DescribeCollectionResponse) {}
22
22
  rpc GetCollectionStatistics(GetCollectionStatisticsRequest) returns (GetCollectionStatisticsResponse) {}
23
23
  rpc ShowCollections(ShowCollectionsRequest) returns (ShowCollectionsResponse) {}
24
+ rpc AlterCollection(AlterCollectionRequest) returns (common.Status) {}
24
25
 
25
26
  rpc CreatePartition(CreatePartitionRequest) returns (common.Status) {}
26
27
  rpc DropPartition(DropPartitionRequest) returns (common.Status) {}
@@ -30,13 +31,17 @@ service MilvusService {
30
31
  rpc GetPartitionStatistics(GetPartitionStatisticsRequest) returns (GetPartitionStatisticsResponse) {}
31
32
  rpc ShowPartitions(ShowPartitionsRequest) returns (ShowPartitionsResponse) {}
32
33
 
34
+ rpc GetLoadingProgress(GetLoadingProgressRequest) returns (GetLoadingProgressResponse) {}
35
+
33
36
  rpc CreateAlias(CreateAliasRequest) returns (common.Status) {}
34
37
  rpc DropAlias(DropAliasRequest) returns (common.Status) {}
35
38
  rpc AlterAlias(AlterAliasRequest) returns (common.Status) {}
36
39
 
37
40
  rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
38
41
  rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
42
+ // Deprecated: use DescribeIndex instead
39
43
  rpc GetIndexState(GetIndexStateRequest) returns (GetIndexStateResponse) {}
44
+ // Deprecated: use DescribeIndex instead
40
45
  rpc GetIndexBuildProgress(GetIndexBuildProgressRequest) returns (GetIndexBuildProgressResponse) {}
41
46
  rpc DropIndex(DropIndexRequest) returns (common.Status) {}
42
47
 
@@ -59,6 +64,8 @@ service MilvusService {
59
64
 
60
65
  // https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
61
66
  rpc GetMetrics(GetMetricsRequest) returns (GetMetricsResponse) {}
67
+ rpc GetComponentStates(GetComponentStatesRequest) returns (ComponentStates) {}
68
+
62
69
  rpc LoadBalance(LoadBalanceRequest) returns (common.Status) {}
63
70
  rpc GetCompactionState(GetCompactionStateRequest) returns (GetCompactionStateResponse) {}
64
71
  rpc ManualCompaction(ManualCompactionRequest) returns (ManualCompactionResponse) {}
@@ -81,9 +88,11 @@ service MilvusService {
81
88
  rpc OperateUserRole(OperateUserRoleRequest) returns (common.Status) {}
82
89
  rpc SelectRole(SelectRoleRequest) returns (SelectRoleResponse) {}
83
90
  rpc SelectUser(SelectUserRequest) returns (SelectUserResponse) {}
84
- rpc SelectResource(SelectResourceRequest) returns (SelectResourceResponse) {}
85
91
  rpc OperatePrivilege(OperatePrivilegeRequest) returns (common.Status) {}
86
92
  rpc SelectGrant(SelectGrantRequest) returns (SelectGrantResponse) {}
93
+
94
+ rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
95
+ rpc CheckHealth(CheckHealthRequest) returns (CheckHealthResponse) {}
87
96
  }
88
97
 
89
98
  message CreateAliasRequest {
@@ -111,9 +120,9 @@ message AlterAliasRequest{
111
120
  */
112
121
  message CreateCollectionRequest {
113
122
  option (common.privilege_ext_obj) = {
114
- resource_type: Collection
115
- resource_privilege: PrivilegeCreate
116
- resource_name_index: 3
123
+ object_type: Global
124
+ object_privilege: PrivilegeCreateCollection
125
+ object_name_index: -1
117
126
  };
118
127
  // Not useful for now
119
128
  common.MsgBase base = 1;
@@ -128,6 +137,7 @@ message CreateCollectionRequest {
128
137
  int32 shards_num = 5;
129
138
  // The consistency level that the collection used, modification is not supported now.
130
139
  common.ConsistencyLevel consistency_level = 6;
140
+ repeated common.KeyValuePair properties = 7;
131
141
  }
132
142
 
133
143
  /**
@@ -135,9 +145,9 @@ message CreateCollectionRequest {
135
145
  */
136
146
  message DropCollectionRequest {
137
147
  option (common.privilege_ext_obj) = {
138
- resource_type: Collection
139
- resource_privilege: PrivilegeDrop
140
- resource_name_index: 3
148
+ object_type: Global
149
+ object_privilege: PrivilegeDropCollection
150
+ object_name_index: -1
141
151
  };
142
152
  // Not useful for now
143
153
  common.MsgBase base = 1;
@@ -148,14 +158,28 @@ message DropCollectionRequest {
148
158
  }
149
159
 
150
160
  /**
151
- * Check collection exist in milvus or not.
161
+ * Alter collection in milvus
152
162
  */
153
- message HasCollectionRequest {
163
+ message AlterCollectionRequest {
154
164
  option (common.privilege_ext_obj) = {
155
- resource_type: Collection
156
- resource_privilege: PrivilegeRead
157
- resource_name_index: 3
165
+ object_type: Global
166
+ object_privilege: PrivilegeCreateCollection
167
+ object_name_index: -1
158
168
  };
169
+ // Not useful for now
170
+ common.MsgBase base = 1;
171
+ // Not useful for now
172
+ string db_name = 2;
173
+ // The unique collection name in milvus.(Required)
174
+ string collection_name = 3;
175
+ int64 collectionID = 4;
176
+ repeated common.KeyValuePair properties = 5;
177
+ }
178
+
179
+ /**
180
+ * Check collection exist in milvus or not.
181
+ */
182
+ message HasCollectionRequest {
159
183
  // Not useful for now
160
184
  common.MsgBase base = 1;
161
185
  // Not useful for now
@@ -182,9 +206,9 @@ message StringResponse {
182
206
  */
183
207
  message DescribeCollectionRequest {
184
208
  option (common.privilege_ext_obj) = {
185
- resource_type: Collection
186
- resource_privilege: PrivilegeRead
187
- resource_name_index: 3
209
+ object_type: Global
210
+ object_privilege: PrivilegeDescribeCollection
211
+ object_name_index: -1
188
212
  };
189
213
  // Not useful for now
190
214
  common.MsgBase base = 1;
@@ -226,6 +250,7 @@ message DescribeCollectionResponse {
226
250
  common.ConsistencyLevel consistency_level = 11;
227
251
  // The collection name
228
252
  string collection_name = 12;
253
+ repeated common.KeyValuePair properties = 13;
229
254
  }
230
255
 
231
256
  /**
@@ -233,9 +258,9 @@ message DescribeCollectionResponse {
233
258
  */
234
259
  message LoadCollectionRequest {
235
260
  option (common.privilege_ext_obj) = {
236
- resource_type: Collection
237
- resource_privilege: PrivilegeLoad
238
- resource_name_index: 3
261
+ object_type: Collection
262
+ object_privilege: PrivilegeLoad
263
+ object_name_index: 3
239
264
  };
240
265
  // Not useful for now
241
266
  common.MsgBase base = 1;
@@ -252,9 +277,9 @@ message LoadCollectionRequest {
252
277
  */
253
278
  message ReleaseCollectionRequest {
254
279
  option (common.privilege_ext_obj) = {
255
- resource_type: Collection
256
- resource_privilege: PrivilegeRelease
257
- resource_name_index: 3
280
+ object_type: Collection
281
+ object_privilege: PrivilegeRelease
282
+ object_name_index: 3
258
283
  };
259
284
  // Not useful for now
260
285
  common.MsgBase base = 1;
@@ -264,14 +289,47 @@ message ReleaseCollectionRequest {
264
289
  string collection_name = 3;
265
290
  }
266
291
 
292
+ /**
293
+ * Get statistics like row_count.
294
+ * WARNING: This API is experimental and not useful for now.
295
+ */
296
+ message GetStatisticsRequest {
297
+ option (common.privilege_ext_obj) = {
298
+ object_type: Collection
299
+ object_privilege: PrivilegeGetStatistics
300
+ object_name_index: 3
301
+ };
302
+ // Not useful for now
303
+ common.MsgBase base = 1;
304
+ // Not useful for now
305
+ string db_name = 2;
306
+ // The collection name you want get statistics
307
+ string collection_name = 3;
308
+ // The partition names you want get statistics, empty for all partitions
309
+ repeated string partition_names = 4;
310
+ // Not useful for now, reserved for future
311
+ uint64 guarantee_timestamp = 5;
312
+ }
313
+
314
+ /**
315
+ * Will return statistics in stats field like [{key:"row_count",value:"1"}]
316
+ * WARNING: This API is experimental and not useful for now.
317
+ */
318
+ message GetStatisticsResponse {
319
+ // Contain error_code and reason
320
+ common.Status status = 1;
321
+ // Collection statistics data
322
+ repeated common.KeyValuePair stats = 2;
323
+ }
324
+
267
325
  /**
268
326
  * Get collection statistics like row_count.
269
327
  */
270
328
  message GetCollectionStatisticsRequest {
271
329
  option (common.privilege_ext_obj) = {
272
- resource_type: Collection
273
- resource_privilege: PrivilegeRead
274
- resource_name_index: 3
330
+ object_type: Collection
331
+ object_privilege: PrivilegeGetStatistics
332
+ object_name_index: 3
275
333
  };
276
334
  // Not useful for now
277
335
  common.MsgBase base = 1;
@@ -294,8 +352,9 @@ message GetCollectionStatisticsResponse {
294
352
  /*
295
353
  * This is for ShowCollectionsRequest type field.
296
354
  */
355
+ // Deprecated: use GetLoadingProgress rpc instead
297
356
  enum ShowType {
298
- // Will return all colloections
357
+ // Will return all collections
299
358
  All = 0;
300
359
  // Will return loaded collections with their inMemory_percentages
301
360
  InMemory = 1;
@@ -306,8 +365,9 @@ enum ShowType {
306
365
  */
307
366
  message ShowCollectionsRequest {
308
367
  option (common.privilege_ext_obj) = {
309
- resource_type: Collection
310
- resource_privilege: PrivilegeRead
368
+ object_type: Global
369
+ object_privilege: PrivilegeShowCollections
370
+ object_name_index: -1
311
371
  };
312
372
  // Not useful for now
313
373
  common.MsgBase base = 1;
@@ -318,6 +378,7 @@ message ShowCollectionsRequest {
318
378
  // Decide return Loaded collections or All collections(Optional)
319
379
  ShowType type = 4;
320
380
  // When type is InMemory, will return these collection's inMemory_percentages.(Optional)
381
+ // Deprecated: use GetLoadingProgress rpc instead
321
382
  repeated string collection_names = 5;
322
383
  }
323
384
 
@@ -336,6 +397,7 @@ message ShowCollectionsResponse {
336
397
  // The utc timestamp calculated by created_timestamp
337
398
  repeated uint64 created_utc_timestamps = 5;
338
399
  // Load percentage on querynode when type is InMemory
400
+ // Deprecated: use GetLoadingProgress rpc instead
339
401
  repeated int64 inMemory_percentages = 6;
340
402
  // Indicate whether query service is available
341
403
  repeated bool query_service_available = 7;
@@ -449,6 +511,7 @@ message ShowPartitionsRequest {
449
511
  // When type is InMemory, will return these patitions's inMemory_percentages.(Optional)
450
512
  repeated string partition_names = 5;
451
513
  // Decide return Loaded partitions or All partitions(Optional)
514
+ // Deprecated: use GetLoadingProgress rpc instead
452
515
  ShowType type = 6;
453
516
  }
454
517
 
@@ -468,6 +531,7 @@ message ShowPartitionsResponse {
468
531
  // All utc timestamps calculated by created_timestamps
469
532
  repeated uint64 created_utc_timestamps = 5;
470
533
  // Load percentage on querynode
534
+ // Deprecated: use GetLoadingProgress rpc instead
471
535
  repeated int64 inMemory_percentages = 6;
472
536
  }
473
537
 
@@ -500,6 +564,11 @@ message ShowSegmentsResponse {
500
564
  * Create index for vector datas
501
565
  */
502
566
  message CreateIndexRequest {
567
+ option (common.privilege_ext_obj) = {
568
+ object_type: Collection
569
+ object_privilege: PrivilegeCreateIndex
570
+ object_name_index: 3
571
+ };
503
572
  // Not useful for now
504
573
  common.MsgBase base = 1;
505
574
  // Not useful for now
@@ -519,13 +588,18 @@ message CreateIndexRequest {
519
588
  * Current release of Milvus only supports showing latest built index.
520
589
  */
521
590
  message DescribeIndexRequest {
591
+ option (common.privilege_ext_obj) = {
592
+ object_type: Collection
593
+ object_privilege: PrivilegeIndexDetail
594
+ object_name_index: 3
595
+ };
522
596
  // Not useful for now
523
597
  common.MsgBase base = 1;
524
598
  // Not useful for now
525
599
  string db_name = 2;
526
600
  // The particular collection name in Milvus
527
601
  string collection_name = 3;
528
- // The vector field name in this particular collection
602
+ // The vector field name in this particular collection
529
603
  string field_name = 4;
530
604
  // No need to set up for now @2021.06.30
531
605
  string index_name = 5;
@@ -543,6 +617,12 @@ message IndexDescription {
543
617
  repeated common.KeyValuePair params = 3;
544
618
  // The vector field name
545
619
  string field_name = 4;
620
+ // index build progress
621
+ int64 indexed_rows = 5;
622
+ int64 total_rows = 6;
623
+ // index state
624
+ common.IndexState state = 7;
625
+ string index_state_fail_reason = 8;
546
626
  }
547
627
 
548
628
  /*
@@ -559,6 +639,11 @@ message DescribeIndexResponse {
559
639
  * Get index building progress
560
640
  */
561
641
  message GetIndexBuildProgressRequest {
642
+ option (common.privilege_ext_obj) = {
643
+ object_type: Collection
644
+ object_privilege: PrivilegeIndexDetail
645
+ object_name_index: 3
646
+ };
562
647
  // Not useful for now
563
648
  common.MsgBase base = 1;
564
649
  // Not useful for now
@@ -578,6 +663,11 @@ message GetIndexBuildProgressResponse {
578
663
  }
579
664
 
580
665
  message GetIndexStateRequest {
666
+ option (common.privilege_ext_obj) = {
667
+ object_type: Collection
668
+ object_privilege: PrivilegeIndexDetail
669
+ object_name_index: 3
670
+ };
581
671
  common.MsgBase base = 1; // must
582
672
  string db_name = 2 ;
583
673
  string collection_name = 3; // must
@@ -592,6 +682,11 @@ message GetIndexStateResponse {
592
682
  }
593
683
 
594
684
  message DropIndexRequest {
685
+ option (common.privilege_ext_obj) = {
686
+ object_type: Collection
687
+ object_privilege: PrivilegeDropIndex
688
+ object_name_index: 3
689
+ };
595
690
  common.MsgBase base = 1; // must
596
691
  string db_name = 2;
597
692
  string collection_name = 3; // must
@@ -600,6 +695,11 @@ message DropIndexRequest {
600
695
  }
601
696
 
602
697
  message InsertRequest {
698
+ option (common.privilege_ext_obj) = {
699
+ object_type: Collection
700
+ object_privilege: PrivilegeInsert
701
+ object_name_index: 3
702
+ };
603
703
  common.MsgBase base = 1;
604
704
  string db_name = 2;
605
705
  string collection_name = 3;
@@ -622,6 +722,11 @@ message MutationResult {
622
722
  }
623
723
 
624
724
  message DeleteRequest {
725
+ option (common.privilege_ext_obj) = {
726
+ object_type: Collection
727
+ object_privilege: PrivilegeDelete
728
+ object_name_index: 3
729
+ };
625
730
  common.MsgBase base = 1;
626
731
  string db_name = 2;
627
732
  string collection_name = 3;
@@ -632,6 +737,11 @@ message DeleteRequest {
632
737
 
633
738
 
634
739
  message SearchRequest {
740
+ option (common.privilege_ext_obj) = {
741
+ object_type: Collection
742
+ object_privilege: PrivilegeSearch
743
+ object_name_index: 3
744
+ };
635
745
  common.MsgBase base = 1; // must
636
746
  string db_name = 2;
637
747
  string collection_name = 3; // must
@@ -660,6 +770,11 @@ message SearchResults {
660
770
  }
661
771
 
662
772
  message FlushRequest {
773
+ option (common.privilege_ext_obj) = {
774
+ object_type: Collection
775
+ object_privilege: PrivilegeFlush
776
+ object_name_indexs: 3
777
+ };
663
778
  common.MsgBase base = 1;
664
779
  string db_name = 2;
665
780
  repeated string collection_names = 3;
@@ -669,9 +784,16 @@ message FlushResponse{
669
784
  common.Status status = 1;
670
785
  string db_name = 2;
671
786
  map<string, schema.LongArray> coll_segIDs = 3;
787
+ map<string, schema.LongArray> flush_coll_segIDs = 4;
788
+ map<string, int64> coll_seal_times = 5;
672
789
  }
673
790
 
674
791
  message QueryRequest {
792
+ option (common.privilege_ext_obj) = {
793
+ object_type: Collection
794
+ object_privilege: PrivilegeQuery
795
+ object_name_index: 3
796
+ };
675
797
  common.MsgBase base = 1;
676
798
  string db_name = 2;
677
799
  string collection_name = 3;
@@ -680,6 +802,7 @@ message QueryRequest {
680
802
  repeated string partition_names = 6;
681
803
  uint64 travel_timestamp = 7;
682
804
  uint64 guarantee_timestamp = 8; // guarantee_timestamp
805
+ repeated common.KeyValuePair query_params = 9; // optional
683
806
  }
684
807
 
685
808
  message QueryResults {
@@ -713,8 +836,8 @@ message CalcDistanceResults {
713
836
  common.Status status = 1;
714
837
  // num(op_left)*num(op_right) distance values, "HAMMIN" return integer distance
715
838
  oneof array {
716
- schema.IntArray int_dist = 2;
717
- schema.FloatArray float_dist = 3;
839
+ schema.IntArray int_dist = 2;
840
+ schema.FloatArray float_dist = 3;
718
841
  }
719
842
  }
720
843
 
@@ -789,10 +912,31 @@ message GetMetricsResponse {
789
912
  string component_name = 3; // metrics from which component
790
913
  }
791
914
 
915
+ message ComponentInfo {
916
+ int64 nodeID = 1;
917
+ string role = 2;
918
+ common.StateCode state_code = 3;
919
+ repeated common.KeyValuePair extra_info = 4;
920
+ }
921
+
922
+ message ComponentStates {
923
+ ComponentInfo state = 1;
924
+ repeated ComponentInfo subcomponent_states = 2;
925
+ common.Status status = 3;
926
+ }
927
+
928
+ message GetComponentStatesRequest {
929
+ }
930
+
792
931
  /*
793
932
  * Do load balancing operation from src_nodeID to dst_nodeID.
794
933
  */
795
934
  message LoadBalanceRequest {
935
+ option (common.privilege_ext_obj) = {
936
+ object_type: Collection
937
+ object_privilege: PrivilegeLoadBalance
938
+ object_name_index: 5
939
+ };
796
940
  common.MsgBase base = 1;
797
941
  int64 src_nodeID = 2;
798
942
  repeated int64 dst_nodeIDs = 3;
@@ -801,6 +945,11 @@ message LoadBalanceRequest {
801
945
  }
802
946
 
803
947
  message ManualCompactionRequest {
948
+ option (common.privilege_ext_obj) = {
949
+ object_type: Collection
950
+ object_privilege: PrivilegeCompaction
951
+ object_name_index: 1
952
+ };
804
953
  int64 collectionID = 1;
805
954
  uint64 timetravel = 2;
806
955
  }
@@ -820,6 +969,7 @@ message GetCompactionStateResponse {
820
969
  int64 executingPlanNo = 3;
821
970
  int64 timeoutPlanNo = 4;
822
971
  int64 completedPlanNo = 5;
972
+ int64 failedPlanNo = 6;
823
973
  }
824
974
 
825
975
  message GetCompactionPlansRequest {
@@ -847,6 +997,11 @@ message GetFlushStateResponse {
847
997
  }
848
998
 
849
999
  message ImportRequest {
1000
+ option (common.privilege_ext_obj) = {
1001
+ object_type: Collection
1002
+ object_privilege: PrivilegeImport
1003
+ object_name_index: 1
1004
+ };
850
1005
  string collection_name = 1; // target collection
851
1006
  string partition_name = 2; // target partition
852
1007
  repeated string channel_names = 3; // channel names for the collection
@@ -871,11 +1026,14 @@ message GetImportStateResponse {
871
1026
  repeated int64 id_list = 4; // auto generated ids if the primary key is autoid
872
1027
  repeated common.KeyValuePair infos = 5; // more information about the task, progress percent, file path, failed reason, etc.
873
1028
  int64 id = 6; // id of an import task
874
- bool data_queryable = 7; // A flag indicating whether import data are queryable (i.e. loaded in query nodes)
875
- bool data_indexed = 8; // A flag indicating whether import data are indexed.
1029
+ int64 collection_id = 7; // collection ID of the import task.
1030
+ repeated int64 segment_ids = 8; // a list of segment IDs created by the import task.
1031
+ int64 create_ts = 9; // timestamp when the import task is created.
876
1032
  }
877
1033
 
878
1034
  message ListImportTasksRequest {
1035
+ string collection_name = 1; // target collection, list all tasks if the name is empty
1036
+ int64 limit = 2; // maximum number of tasks returned, list all tasks if the value is 0
879
1037
  }
880
1038
 
881
1039
  message ListImportTasksResponse {
@@ -903,12 +1061,12 @@ message ReplicaInfo { // ReplicaGroup
903
1061
  }
904
1062
 
905
1063
  message ShardReplica {
906
- int64 leaderID = 1;
907
- string leader_addr = 2; // IP:port
908
- string dm_channel_name = 3;
909
- // optional, DO NOT save it in meta, set it only for GetReplicas()
910
- // if with_shard_nodes is true
911
- repeated int64 node_ids = 4;
1064
+ int64 leaderID = 1;
1065
+ string leader_addr = 2; // IP:port
1066
+ string dm_channel_name = 3;
1067
+ // optional, DO NOT save it in meta, set it only for GetReplicas()
1068
+ // if with_shard_nodes is true
1069
+ repeated int64 node_ids = 4;
912
1070
  }
913
1071
 
914
1072
  service ProxyService {
@@ -918,6 +1076,11 @@ service ProxyService {
918
1076
  // https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
919
1077
 
920
1078
  message CreateCredentialRequest {
1079
+ option (common.privilege_ext_obj) = {
1080
+ object_type: Global
1081
+ object_privilege: PrivilegeCreateOwnership
1082
+ object_name_index: -1
1083
+ };
921
1084
  // Not useful for now
922
1085
  common.MsgBase base = 1;
923
1086
  // username
@@ -931,6 +1094,11 @@ message CreateCredentialRequest {
931
1094
  }
932
1095
 
933
1096
  message UpdateCredentialRequest {
1097
+ option (common.privilege_ext_obj) = {
1098
+ object_type: User
1099
+ object_privilege: PrivilegeUpdateUser
1100
+ object_name_index: 2
1101
+ };
934
1102
  // Not useful for now
935
1103
  common.MsgBase base = 1;
936
1104
  // username
@@ -946,6 +1114,11 @@ message UpdateCredentialRequest {
946
1114
  }
947
1115
 
948
1116
  message DeleteCredentialRequest {
1117
+ option (common.privilege_ext_obj) = {
1118
+ object_type: Global
1119
+ object_privilege: PrivilegeDropOwnership
1120
+ object_name_index: -1
1121
+ };
949
1122
  // Not useful for now
950
1123
  common.MsgBase base = 1;
951
1124
  // Not useful for now
@@ -960,6 +1133,11 @@ message ListCredUsersResponse {
960
1133
  }
961
1134
 
962
1135
  message ListCredUsersRequest {
1136
+ option (common.privilege_ext_obj) = {
1137
+ object_type: Global
1138
+ object_privilege: PrivilegeSelectOwnership
1139
+ object_name_index: -1
1140
+ };
963
1141
  // Not useful for now
964
1142
  common.MsgBase base = 1;
965
1143
  }
@@ -974,6 +1152,11 @@ message UserEntity {
974
1152
  }
975
1153
 
976
1154
  message CreateRoleRequest {
1155
+ option (common.privilege_ext_obj) = {
1156
+ object_type: Global
1157
+ object_privilege: PrivilegeCreateOwnership
1158
+ object_name_index: -1
1159
+ };
977
1160
  // Not useful for now
978
1161
  common.MsgBase base = 1;
979
1162
  // role
@@ -981,6 +1164,11 @@ message CreateRoleRequest {
981
1164
  }
982
1165
 
983
1166
  message DropRoleRequest {
1167
+ option (common.privilege_ext_obj) = {
1168
+ object_type: Global
1169
+ object_privilege: PrivilegeDropOwnership
1170
+ object_name_index: -1
1171
+ };
984
1172
  // Not useful for now
985
1173
  common.MsgBase base = 1;
986
1174
  // role name
@@ -993,6 +1181,11 @@ enum OperateUserRoleType {
993
1181
  }
994
1182
 
995
1183
  message OperateUserRoleRequest {
1184
+ option (common.privilege_ext_obj) = {
1185
+ object_type: Global
1186
+ object_privilege: PrivilegeManageOwnership
1187
+ object_name_index: -1
1188
+ };
996
1189
  // Not useful for now
997
1190
  common.MsgBase base = 1;
998
1191
  // username
@@ -1004,6 +1197,11 @@ message OperateUserRoleRequest {
1004
1197
  }
1005
1198
 
1006
1199
  message SelectRoleRequest {
1200
+ option (common.privilege_ext_obj) = {
1201
+ object_type: Global
1202
+ object_privilege: PrivilegeSelectOwnership
1203
+ object_name_index: -1
1204
+ };
1007
1205
  // Not useful for now
1008
1206
  common.MsgBase base = 1;
1009
1207
  // role
@@ -1025,6 +1223,11 @@ message SelectRoleResponse {
1025
1223
  }
1026
1224
 
1027
1225
  message SelectUserRequest {
1226
+ option (common.privilege_ext_obj) = {
1227
+ object_type: User
1228
+ object_privilege: PrivilegeSelectUser
1229
+ object_name_index: 2
1230
+ };
1028
1231
  // Not useful for now
1029
1232
  common.MsgBase base = 1;
1030
1233
  // user
@@ -1042,65 +1245,43 @@ message SelectUserResponse {
1042
1245
  // Not useful for now
1043
1246
  common.Status status = 1;
1044
1247
  // user result array
1045
- repeated UserResult result = 2;
1248
+ repeated UserResult results = 2;
1046
1249
  }
1047
1250
 
1048
- message ResourceEntity {
1049
- string type = 1;
1251
+ message ObjectEntity {
1252
+ string name = 1;
1050
1253
  }
1051
1254
 
1052
1255
  message PrivilegeEntity {
1053
1256
  string name = 1;
1054
1257
  }
1055
1258
 
1056
- message SelectResourceRequest {
1057
- // Not useful for now
1058
- common.MsgBase base = 1;
1059
- // resource
1060
- ResourceEntity entity = 2;
1061
- // include privilege info
1062
- bool include_privilege_info = 3;
1063
- }
1064
-
1065
- message ResourceResult {
1066
- ResourceEntity resource = 1;
1067
- repeated PrivilegeEntity privileges = 2;
1068
- }
1069
-
1070
- message SelectResourceResponse {
1071
- // Not useful for now
1072
- common.Status status = 1;
1073
- // resource result array
1074
- repeated ResourceResult results = 2;
1075
- }
1076
-
1077
- message PrincipalEntity {
1078
- // principal type, including user, role
1079
- string principal_type = 1;
1080
- // principal, including user entity or role entity
1081
- oneof principal {
1082
- UserEntity user = 2;
1083
- RoleEntity role = 3;
1084
- }
1085
- }
1086
-
1087
1259
  message GrantorEntity {
1088
1260
  UserEntity user = 1;
1089
1261
  PrivilegeEntity privilege = 2;
1090
1262
  }
1091
1263
 
1264
+ message GrantPrivilegeEntity {
1265
+ repeated GrantorEntity entities = 1;
1266
+ }
1267
+
1092
1268
  message GrantEntity {
1093
- // principal
1094
- PrincipalEntity principal = 1;
1095
- // resource
1096
- ResourceEntity resource = 2;
1097
- // resource name
1098
- string resource_name = 3;
1269
+ // role
1270
+ RoleEntity role = 1;
1271
+ // object
1272
+ ObjectEntity object = 2;
1273
+ // object name
1274
+ string object_name = 3;
1099
1275
  // privilege
1100
1276
  GrantorEntity grantor = 4;
1101
1277
  }
1102
1278
 
1103
1279
  message SelectGrantRequest {
1280
+ option (common.privilege_ext_obj) = {
1281
+ object_type: Global
1282
+ object_privilege: PrivilegeSelectOwnership
1283
+ object_name_index: -1
1284
+ };
1104
1285
  // Not useful for now
1105
1286
  common.MsgBase base = 1;
1106
1287
  // grant
@@ -1120,6 +1301,11 @@ enum OperatePrivilegeType {
1120
1301
  }
1121
1302
 
1122
1303
  message OperatePrivilegeRequest {
1304
+ option (common.privilege_ext_obj) = {
1305
+ object_type: Global
1306
+ object_privilege: PrivilegeManageOwnership
1307
+ object_name_index: -1
1308
+ };
1123
1309
  // Not useful for now
1124
1310
  common.MsgBase base = 1;
1125
1311
  // grant
@@ -1128,6 +1314,18 @@ message OperatePrivilegeRequest {
1128
1314
  OperatePrivilegeType type = 3;
1129
1315
  }
1130
1316
 
1317
+ message GetLoadingProgressRequest {
1318
+ // Not useful for now
1319
+ common.MsgBase base = 1;
1320
+ string collection_name = 2;
1321
+ repeated string partition_names = 3;
1322
+ }
1323
+
1324
+ message GetLoadingProgressResponse {
1325
+ common.Status status = 1;
1326
+ int64 progress = 2;
1327
+ }
1328
+
1131
1329
  message MilvusExt {
1132
1330
  string version = 1;
1133
1331
  }
@@ -1136,6 +1334,19 @@ extend google.protobuf.FileOptions {
1136
1334
  MilvusExt milvus_ext_obj = 1001;
1137
1335
  }
1138
1336
 
1139
- option (milvus_ext_obj) = {
1140
- version: "2.1.0"
1141
- };
1337
+ message GetVersionRequest {
1338
+ }
1339
+
1340
+ message GetVersionResponse {
1341
+ common.Status status = 1;
1342
+ string version =2;
1343
+ }
1344
+
1345
+ message CheckHealthRequest {
1346
+ }
1347
+
1348
+ message CheckHealthResponse {
1349
+ common.Status status = 1;
1350
+ bool isHealthy = 2;
1351
+ repeated string reasons = 3;
1352
+ }