milvus.proto 20.1 KB
Newer Older
1 2 3
syntax = "proto3";
package milvus.proto.milvus;

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

import "common.proto";
Y
yukun 已提交
7
import "schema.proto";
8

G
godchen 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
service MilvusService {
  rpc CreateCollection(CreateCollectionRequest) returns (common.Status) {}
  rpc DropCollection(DropCollectionRequest) returns (common.Status) {}
  rpc HasCollection(HasCollectionRequest) returns (BoolResponse) {}
  rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
  rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
  rpc DescribeCollection(DescribeCollectionRequest) returns (DescribeCollectionResponse) {}
  rpc GetCollectionStatistics(GetCollectionStatisticsRequest) returns (GetCollectionStatisticsResponse) {}
  rpc ShowCollections(ShowCollectionsRequest) returns (ShowCollectionsResponse) {}

  rpc CreatePartition(CreatePartitionRequest) returns (common.Status) {}
  rpc DropPartition(DropPartitionRequest) returns (common.Status) {}
  rpc HasPartition(HasPartitionRequest) returns (BoolResponse) {}
  rpc LoadPartitions(LoadPartitionsRequest) returns (common.Status) {}
  rpc ReleasePartitions(ReleasePartitionsRequest) returns (common.Status) {}
  rpc GetPartitionStatistics(GetPartitionStatisticsRequest) returns (GetPartitionStatisticsResponse) {}
  rpc ShowPartitions(ShowPartitionsRequest) returns (ShowPartitionsResponse) {}

Y
Yusup 已提交
27 28 29 30
  rpc CreateAlias(CreateAliasRequest) returns (common.Status) {}
  rpc DropAlias(DropAliasRequest) returns (common.Status) {}
  rpc AlterAlias(AlterAliasRequest) returns (common.Status) {}

G
godchen 已提交
31 32 33
  rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
  rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
  rpc GetIndexState(GetIndexStateRequest) returns (GetIndexStateResponse) {}
34
  rpc GetIndexBuildProgress(GetIndexBuildProgressRequest) returns (GetIndexBuildProgressResponse) {}
G
godchen 已提交
35 36
  rpc DropIndex(DropIndexRequest) returns (common.Status) {}

37
  rpc Insert(InsertRequest) returns (MutationResult) {}
G
groot 已提交
38
  rpc Delete(DeleteRequest) returns (MutationResult) {}
G
godchen 已提交
39
  rpc Search(SearchRequest) returns (SearchResults) {}
40
  rpc Flush(FlushRequest) returns (FlushResponse) {}
X
Xiangyu Wang 已提交
41
  rpc Query(QueryRequest) returns (QueryResults) {}
42
  rpc CalcDistance(CalcDistanceRequest) returns (CalcDistanceResults) {}
G
godchen 已提交
43 44 45 46

  rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
  rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}

X
Xiangyu Wang 已提交
47 48
  rpc Dummy(DummyRequest) returns (DummyResponse) {}

G
godchen 已提交
49 50
  // TODO: remove
  rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
51 52 53

  // https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
  rpc GetMetrics(GetMetricsRequest) returns (GetMetricsResponse) {}
B
bigsheeper 已提交
54
  rpc LoadBalance(LoadBalanceRequest) returns (common.Status) {}
55 56
  rpc GetCompactionState(GetCompactionStateRequest) returns (GetCompactionStateResponse) {}
  rpc ManualCompaction(ManualCompactionRequest) returns (ManualCompactionResponse) {}
G
godchen 已提交
57 58
}

Y
Yusup 已提交
59 60
message CreateAliasRequest {
  common.MsgBase base = 1;
C
Cai Yudong 已提交
61 62 63
  string db_name = 2;
  string collection_name = 3;
  string alias = 4;
Y
Yusup 已提交
64 65 66 67
}

message DropAliasRequest {
  common.MsgBase base = 1;
C
Cai Yudong 已提交
68 69
  string db_name = 2;
  string alias = 3;
Y
Yusup 已提交
70 71 72 73
}

message AlterAliasRequest{
  common.MsgBase base = 1;
C
Cai Yudong 已提交
74 75 76
  string db_name = 2;
  string collection_name = 3;
  string alias = 4;
Y
Yusup 已提交
77 78
}

79
/**
Y
Yusup 已提交
80
* Create collection in milvus
81
*/
82
message CreateCollectionRequest {
83 84 85
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
86
  string db_name = 2;
87 88 89 90 91
  // The unique collection name in milvus.(Required)
  string collection_name = 3; 
  // The serialized `schema.CollectionSchema`(Required)
  bytes schema = 4; 
  // Once set, no modification is allowed (Optional)
92
  // https://github.com/milvus-io/milvus/issues/6690
93
  int32 shards_num = 5;
94 95
}

96 97 98
/**
* Drop collection in milvus, also will drop data in collection. 
*/
99
message DropCollectionRequest {
100 101 102
  // Not useful for now
  common.MsgBase base = 1; 
  // Not useful for now
Z
zhenshan.cao 已提交
103
  string db_name = 2;
104 105
  // The unique collection name in milvus.(Required)
  string collection_name = 3;
106 107
}

108 109 110
/**
* Check collection exist in milvus or not.
*/
111
message HasCollectionRequest {
112 113 114
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
115
  string db_name = 2;
116 117
  // The collection name you want to check.
  string collection_name = 3; 
118
  // If time_stamp is not zero, will return true when time_stamp >= created collection timestamp, otherwise will return false.
N
neza2017 已提交
119
  uint64 time_stamp = 4;
120 121
}

122

Y
yukun 已提交
123 124 125 126 127
message BoolResponse {
  common.Status status = 1;
  bool value = 2;
}

Z
zhenshan.cao 已提交
128 129 130 131 132
message StringResponse {
  common.Status status = 1;
  string value = 2;
}

133 134 135
/**
* Get collection meta datas like: schema, collectionID, shards number ...
*/
136
message DescribeCollectionRequest {
137 138 139
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
140
  string db_name = 2;
141
  // The collection name you want to describe, you can pass collection_name or collectionID
142
  string collection_name = 3;
143
  // The collection ID you want to describe
N
neza2017 已提交
144
  int64 collectionID = 4;
145
  // If time_stamp is not zero, will describe collection success when time_stamp >= created collection timestamp, otherwise will throw error.
N
neza2017 已提交
146
  uint64 time_stamp = 5;
147 148
}

149 150 151
/**
* DescribeCollection Response
*/
152
message DescribeCollectionResponse {
153
  // Contain error_code and reason
Y
yukun 已提交
154
  common.Status status = 1;
155
  // The schema param when you created collection.
Y
yukun 已提交
156
  schema.CollectionSchema schema = 2;
157
  // The collection id
158
  int64 collectionID = 3;
159
  // System design related, users should not perceive
160
  repeated string virtual_channel_names = 4;
161
  // System design related, users should not perceive
162
  repeated string physical_channel_names = 5;
163 164 165 166 167
  // Hybrid timestamp in milvus
  uint64 created_timestamp = 6;
  // The utc timestamp calculated by created_timestamp
  uint64 created_utc_timestamp = 7;
  // The shards number you set.
Y
Yusup 已提交
168 169 170
  int32 shards_num = 8;
  // The aliases of this collection
  repeated string aliases = 9;
171 172
  // The message ID/posititon when collection is created
  repeated common.KeyDataPair start_positions = 10;
173 174
}

175 176 177
/**
* Load collection data into query nodes, then you can do vector search on this collection.
*/
178
message LoadCollectionRequest {
179 180 181
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
182
  string db_name = 2;
183 184
  // The collection name you want to load
  string collection_name = 3;
185 186
}

187 188 189
/**
* Release collection data from query nodes, then you can't do vector search on this collection.
*/
190
message ReleaseCollectionRequest {
191 192 193
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
194
  string db_name = 2;
195 196
  // The collection name you want to release
  string collection_name = 3;
197 198
}

199 200 201
/**
* Get collection statistics like row_count.
*/
G
godchen 已提交
202
message GetCollectionStatisticsRequest {
203 204 205
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
206
  string db_name = 2;
207 208
  // The collection name you want get statistics
  string collection_name = 3;
209 210
}

211 212 213
/**
* Will return collection statistics in stats field like [{key:"row_count",value:"1"}]
*/
G
godchen 已提交
214
message GetCollectionStatisticsResponse {
215
  // Contain error_code and reason
Z
zhenshan.cao 已提交
216
  common.Status status = 1;
217
  // Collection statistics data
Z
zhenshan.cao 已提交
218
  repeated common.KeyValuePair stats = 2;
219 220
}

221 222 223
/*
* This is for ShowCollectionsRequest type field.
*/
224
enum ShowType {
225
  // Will return all colloections 
226
  All = 0;
227
  // Will return loaded collections with their inMemory_percentages
228 229 230
  InMemory = 1;
}

231 232 233
/*
* List collections 
*/
G
godchen 已提交
234
message ShowCollectionsRequest {
235 236 237
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
238
  string db_name = 2;
239
  // Not useful for now
N
neza2017 已提交
240
  uint64 time_stamp = 3;
241
  // Decide return Loaded collections or All collections(Optional)
242
  ShowType type = 4;
243 244
  // When type is InMemory, will return these collection's inMemory_percentages.(Optional)
  repeated string collection_names = 5; 
245 246
}

247 248 249
/*
* Return basic collection infos.
*/
G
godchen 已提交
250
message ShowCollectionsResponse {
251
  // Contain error_code and reason
Z
zhenshan.cao 已提交
252
  common.Status status = 1;
253
  // Collection name array
Z
zhenshan.cao 已提交
254
  repeated string collection_names = 2;
255
  // Collection Id array
256
  repeated int64 collection_ids = 3;
257 258 259 260 261 262
  // Hybrid timestamps in milvus
  repeated uint64 created_timestamps = 4;
  // The utc timestamp calculated by created_timestamp
  repeated uint64 created_utc_timestamps = 5;
  // Load percentage on querynode when type is InMemory
  repeated int64 inMemory_percentages = 6; 
263 264
}

265 266 267
/*
* Create partition in created collection.
*/
268
message CreatePartitionRequest {
269 270 271
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
272
  string db_name = 2;
273 274 275 276
  // The collection name in milvus
  string collection_name = 3;
  // The partition name you want to create.
  string partition_name = 4;
277 278
}

279 280 281
/*
* Drop partition in created collection.
*/
282
message DropPartitionRequest {
283 284 285
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
286
  string db_name = 2;
287 288 289 290
  // The collection name in milvus
  string collection_name = 3;
  // The partition name you want to drop
  string partition_name = 4; 
291 292
}

293 294 295
/*
* Check if partition exist in collection or not.
*/
296
message HasPartitionRequest {
297 298 299
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
300
  string db_name = 2;
301 302 303 304
  // The collection name in milvus
  string collection_name = 3;
  // The partition name you want to check
  string partition_name = 4;
305 306
}

307 308 309 310
/*
* Load specific partitions data of one collection into query nodes
* Then you can get these data as result when you do vector search on this collection.
*/
G
godchen 已提交
311
message LoadPartitionsRequest {
312 313 314
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
315
  string db_name = 2;
316 317 318 319
  // The collection name in milvus
  string collection_name = 3;
  // The partition names you want to load
  repeated string partition_names = 4;
320 321
}

322 323 324 325
/*
* Release specific partitions data of one collection from query nodes.
* Then you can not get these data as result when you do vector search on this collection.
*/
G
godchen 已提交
326
message ReleasePartitionsRequest {
327 328 329
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
330
  string db_name = 2;
331 332 333 334
  // The collection name in milvus
  string collection_name = 3;
  // The partition names you want to release
  repeated string partition_names = 4;
335 336
}

337 338 339
/*
* Get partition statistics like row_count.
*/
G
godchen 已提交
340
message GetPartitionStatisticsRequest {
341 342 343
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
344
  string db_name = 2;
345 346 347 348
  // The collection name in milvus
  string collection_name = 3;
  // The partition name you want to collect statistics
  string partition_name = 4; 
349 350
}

G
godchen 已提交
351
message GetPartitionStatisticsResponse {
Z
zhenshan.cao 已提交
352 353
  common.Status status = 1;
  repeated common.KeyValuePair stats = 2;
354
}
355

356 357 358
/*
* List all partitions for particular collection
*/
G
godchen 已提交
359
message ShowPartitionsRequest {
360 361 362
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
363
  string db_name = 2;
364 365 366
  // The collection name you want to describe, you can pass collection_name or collectionID
  string collection_name = 3;
  // The collection id in milvus
367
  int64 collectionID = 4;
368 369 370
  // When type is InMemory, will return these patitions's inMemory_percentages.(Optional)
  repeated string partition_names = 5;
  // Decide return Loaded partitions or All partitions(Optional)
371
  ShowType type = 6;
372 373
}

374 375 376 377
/*
* List all partitions for particular collection response.
* The returned datas are all rows, we can format to columns by therir index.
*/
G
godchen 已提交
378
message ShowPartitionsResponse {
379
  // Contain error_code and reason
Z
zhenshan.cao 已提交
380
  common.Status status = 1;
381
  // All partition names for this collection
Z
zhenshan.cao 已提交
382
  repeated string partition_names = 2;
383
  // All partition ids for this collection
Z
zhenshan.cao 已提交
384
  repeated int64 partitionIDs = 3;
385 386 387 388 389 390
  // All hybrid timestamps
  repeated uint64 created_timestamps = 4;
  // All utc timestamps calculated by created_timestamps
  repeated uint64 created_utc_timestamps = 5;
  // Load percentage on querynode
  repeated int64 inMemory_percentages = 6;
391 392 393 394 395 396 397 398 399 400 401
}

message DescribeSegmentRequest {
  common.MsgBase base = 1;
  int64 collectionID = 2;
  int64 segmentID = 3;
}

message DescribeSegmentResponse {
  common.Status status = 1;
  int64 indexID = 2;
N
neza2017 已提交
402
  int64 buildID = 3;
403
  bool enable_index = 4;
404 405
}

G
godchen 已提交
406
message ShowSegmentsRequest {
407 408 409 410 411
  common.MsgBase base = 1;
  int64 collectionID = 2;
  int64 partitionID = 3;
}

G
godchen 已提交
412
message ShowSegmentsResponse {
413 414 415
  common.Status status = 1;
  repeated int64 segmentIDs = 2;
}
416

417 418 419
/*
* Create index for vector datas
*/
420
message CreateIndexRequest {
421 422 423
  // Not useful for now
  common.MsgBase base = 1; 
  // Not useful for now
Z
zhenshan.cao 已提交
424
  string db_name = 2;
425 426 427 428 429 430
  // The particular collection name you want to create index.
  string collection_name = 3;
  // The vector field name in this particular collection
  string field_name = 4;
  // Support keys: index_type,metric_type, params. Different index_type may has different params.
  repeated common.KeyValuePair extra_params = 5; 
431 432
}

433 434 435 436
/*
* Get created index information. 
* Current release of Milvus only supports showing latest built index.
*/
437
message DescribeIndexRequest {
438 439 440
  // Not useful for now
  common.MsgBase base = 1;
  // Not useful for now
Z
zhenshan.cao 已提交
441
  string db_name = 2;
442 443 444
  // The particular collection name in Milvus
  string collection_name = 3;
   // The vector field name in this particular collection
445
  string field_name = 4;
446 447
  // No need to set up for now @2021.06.30
  string index_name = 5; 
448 449
}

450 451 452
/*
* Index informations
*/
453
message IndexDescription {
454
  // Index name
455
  string index_name = 1;
456
  // Index id
G
godchen 已提交
457
  int64 indexID = 2;
458
  // Will return index_type, metric_type, params(like nlist).
459
  repeated common.KeyValuePair params = 3;
460
  // The vector field name
461
  string field_name = 4;
462 463
}

464 465 466
/*
* Describe index response
*/
467
message DescribeIndexResponse {
468
  // Response status
469
  common.Status status = 1;
470
  // All index informations, for now only return tha latest index you created for the collection.
471 472 473
  repeated IndexDescription index_descriptions = 2;
}

474
message GetIndexBuildProgressRequest {
Z
zhenshan.cao 已提交
475
  common.MsgBase base = 1; // must
476
  string db_name = 2 ;
Z
zhenshan.cao 已提交
477
  string collection_name = 3; // must
478
  string field_name = 4;
Z
zhenshan.cao 已提交
479
  string index_name = 5; // must
480 481 482 483 484 485 486 487
}

message GetIndexBuildProgressResponse {
  common.Status status = 1;
  int64 indexed_rows = 2;
  int64 total_rows = 3;
}

G
godchen 已提交
488
message GetIndexStateRequest {
Z
zhenshan.cao 已提交
489
  common.MsgBase base = 1; // must
490
  string db_name = 2 ;
Z
zhenshan.cao 已提交
491
  string collection_name = 3; // must
492
  string field_name = 4;
Z
zhenshan.cao 已提交
493
  string index_name = 5; // No need to set up for now @2021.06.30
494 495
}

G
godchen 已提交
496
message GetIndexStateResponse {
497 498
  common.Status status = 1;
  common.IndexState state = 2;
499
  string fail_reason = 3;
500 501
}

X
xige-16 已提交
502
message DropIndexRequest {
Z
zhenshan.cao 已提交
503
  common.MsgBase base = 1; // must
X
xige-16 已提交
504
  string db_name = 2;
Z
zhenshan.cao 已提交
505
  string collection_name = 3; // must
X
xige-16 已提交
506
  string field_name = 4;
Z
zhenshan.cao 已提交
507
  string index_name = 5; // No need to set up for now @2021.06.30
X
xige-16 已提交
508 509
}

510
message InsertRequest {
511
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
512
  string db_name = 2;
513 514 515 516
  string collection_name = 3;
  string partition_name = 4;
  repeated schema.FieldData fields_data = 5;
  repeated uint32 hash_keys = 6;
517
  uint32 num_rows = 7;
518 519
}

520
message MutationResult {
Z
zhenshan.cao 已提交
521
  common.Status status = 1;
522 523 524 525 526 527 528 529
  schema.IDs IDs = 2; // required for insert, delete
  repeated uint32 succ_index = 3; // error indexes indicate
  repeated uint32 err_index = 4; // error indexes indicate
  bool acknowledged = 5;
  int64 insert_cnt = 6;
  int64 delete_cnt = 7;
  int64 upsert_cnt = 8;
  uint64 timestamp = 9;
Y
yukun 已提交
530 531
}

G
groot 已提交
532 533 534 535 536 537
message DeleteRequest {
  common.MsgBase base = 1;
  string db_name = 2;
  string collection_name = 3;
  string partition_name = 4;
  string expr = 5;
538
  repeated uint32 hash_keys = 6;
G
groot 已提交
539 540
}

Y
yukun 已提交
541
enum PlaceholderType {
G
godchen 已提交
542 543 544
  None = 0;
  BinaryVector = 100;
  FloatVector = 101;
Y
yukun 已提交
545 546 547 548 549 550 551 552 553 554 555
}

message PlaceholderValue {
  string tag = 1;
  PlaceholderType type = 2;
  // values is a 2d-array, every array contains a vector
  repeated bytes values = 3;
}

message PlaceholderGroup {
  repeated PlaceholderValue placeholders = 1;
556 557 558
}

message SearchRequest {
Z
zhenshan.cao 已提交
559
  common.MsgBase base = 1; // must
Z
zhenshan.cao 已提交
560
  string db_name = 2;
Z
zhenshan.cao 已提交
561 562 563
  string collection_name = 3; // must
  repeated string partition_names = 4; // must
  string dsl = 5; // must
Y
yukun 已提交
564
  // serialized `PlaceholderGroup`
Z
zhenshan.cao 已提交
565 566
  bytes placeholder_group = 6; // must
  common.DslType dsl_type = 7; // must
567 568 569
  repeated string output_fields = 8;
  repeated common.KeyValuePair search_params = 9; // must
  uint64 travel_timestamp = 10;
570
  uint64 guarantee_timestamp = 11; // guarantee_timestamp
Y
yukun 已提交
571 572 573 574 575 576 577 578
}

message Hits {
  repeated int64 IDs = 1;
  repeated bytes row_data = 2;
  repeated float scores = 3;
}

579
message SearchResults {
Y
yukun 已提交
580
  common.Status status = 1;
581
  schema.SearchResultData results = 2;
582 583 584
}

message FlushRequest {
585
  common.MsgBase base = 1;
586
  string db_name = 2;
587
  repeated string collection_names = 3;
Y
yukun 已提交
588 589
}

590 591 592 593 594 595
message FlushResponse{
  common.Status status = 1;
  string db_name = 2;
  map<string, schema.LongArray> coll_segIDs = 3;
}

X
Xiangyu Wang 已提交
596 597 598 599 600 601 602
message QueryRequest {
  common.MsgBase base = 1;
  string db_name = 2;
  string collection_name = 3;
  string expr = 4;
  repeated string output_fields = 5;
  repeated string partition_names = 6;
603 604
  uint64 travel_timestamp = 7;
  uint64 guarantee_timestamp = 8; // guarantee_timestamp
X
Xiangyu Wang 已提交
605 606 607 608 609 610 611
}

message QueryResults {
  common.Status status = 1;
  repeated schema.FieldData fields_data = 2;
}

612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
message VectorIDs {
  string collection_name = 1;
  string field_name = 2;
  schema.IDs id_array = 3;
  repeated string partition_names = 4;
}

message VectorsArray {
  oneof array {
    VectorIDs id_array = 1; // vector ids
    schema.VectorField data_array = 2; // vectors data
  } 
}

message CalcDistanceRequest {
  common.MsgBase base = 1;
  VectorsArray op_left = 2; // vectors on the left of operator
  VectorsArray op_right = 3; // vectors on the right of operator
  repeated common.KeyValuePair params = 4; // "metric":"L2"/"IP"/"HAMMIN"/"TANIMOTO"
}

message CalcDistanceResults {
  common.Status status = 1;
  // num(op_left)*num(op_right) distance values, "HAMMIN" return integer distance
  oneof array {
    	schema.IntArray int_dist = 2;
	schema.FloatArray float_dist = 3;
  }
}

Z
zhenshan.cao 已提交
642 643 644 645
message PersistentSegmentInfo {
  int64 segmentID = 1;
  int64 collectionID = 2;
  int64 partitionID = 3;
646 647
  int64 num_rows = 4;
  common.SegmentState state = 5;
Z
zhenshan.cao 已提交
648 649
}

G
godchen 已提交
650
message GetPersistentSegmentInfoRequest {
Z
zhenshan.cao 已提交
651
  common.MsgBase base = 1; // must
Z
zhenshan.cao 已提交
652
  string dbName = 2;
Z
zhenshan.cao 已提交
653
  string collectionName = 3; // must
Z
zhenshan.cao 已提交
654 655
}

G
godchen 已提交
656
message GetPersistentSegmentInfoResponse {
Z
zhenshan.cao 已提交
657 658 659 660
  common.Status status = 1;
  repeated PersistentSegmentInfo infos = 2;
}

Z
zhenshan.cao 已提交
661 662 663 664 665 666 667 668
message QuerySegmentInfo {
  int64 segmentID = 1;
  int64 collectionID = 2;
  int64 partitionID = 3;
  int64 mem_size = 4;
  int64 num_rows = 5;
  string index_name = 6;
  int64 indexID = 7;
669 670
  int64 nodeID = 8;
  common.SegmentState state = 9;
Z
zhenshan.cao 已提交
671 672
}

G
godchen 已提交
673
message GetQuerySegmentInfoRequest {
Z
zhenshan.cao 已提交
674
  common.MsgBase base = 1; // must
Z
zhenshan.cao 已提交
675
  string dbName = 2;
Z
zhenshan.cao 已提交
676
  string collectionName = 3; // must
Z
zhenshan.cao 已提交
677 678
}

G
godchen 已提交
679
message GetQuerySegmentInfoResponse {
Z
zhenshan.cao 已提交
680 681 682 683
  common.Status status = 1;
  repeated QuerySegmentInfo infos = 2;
}

X
Xiangyu Wang 已提交
684 685 686 687 688 689 690
message DummyRequest {
  string request_type = 1;
}

message DummyResponse {
  string response = 1;
}
Z
zhenshan.cao 已提交
691

G
godchen 已提交
692
message RegisterLinkRequest {
Y
yukun 已提交
693
}
D
dragondriver 已提交
694 695 696 697 698 699

message RegisterLinkResponse {
  common.Address address = 1;
  common.Status status = 2;
}

700 701 702 703 704 705 706 707 708 709 710
message GetMetricsRequest {
  common.MsgBase base = 1;
  string request = 2; // request is of jsonic format
}

message GetMetricsResponse {
  common.Status status = 1;
  string response = 2;  // response is of jsonic format
  string component_name = 3; // metrics from which component
}

B
bigsheeper 已提交
711 712 713 714 715 716 717 718 719 720
/*
* Do load balancing operation from src_nodeID to dst_nodeID.
*/
message LoadBalanceRequest {
  common.MsgBase base = 1;
  int64 src_nodeID = 2;
  repeated int64 dst_nodeIDs = 3;
  repeated int64 sealed_segmentIDs = 4;
}

721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757
message ManualCompactionRequest {
  int64 collectionID = 1;
  uint64 timetravel = 2;
}

message ManualCompactionResponse {
  common.Status status = 1;
  int64 compactionID = 2;
}

message GetCompactionStateRequest {
  int64 compactionID = 1;
}

message GetCompactionStateResponse {
  common.Status status = 1;
  common.CompactionState state = 2;
  int64 executingPlanNo = 3;
  int64 timeoutPlanNo = 4;
  int64 completedPlanNo = 5;
}

message GetCompactionPlansRequest {
  int64 compactionID = 1;
}

message GetCompactionPlansResponse {
  common.Status status = 1;
  common.CompactionState state = 2;
  repeated CompactionMergeInfo mergeInfos = 3;
}

message CompactionMergeInfo {
  repeated int64 sources = 1;
  int64 target = 2;
}

D
dragondriver 已提交
758
service ProxyService {
G
godchen 已提交
759
  rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
Y
Yusup 已提交
760
}