2023-01-11 14:35:40 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package milvus.proto.index;
|
|
|
|
|
|
|
|
option go_package = "github.com/milvus-io/milvus/internal/proto/indexpb";
|
|
|
|
|
|
|
|
import "common.proto";
|
|
|
|
import "internal.proto";
|
|
|
|
import "milvus.proto";
|
2023-12-13 17:24:38 +08:00
|
|
|
import "schema.proto";
|
2023-01-11 14:35:40 +08:00
|
|
|
|
|
|
|
service IndexCoord {
|
2023-12-21 18:07:24 +08:00
|
|
|
rpc GetComponentStates(milvus.GetComponentStatesRequest) returns (milvus.ComponentStates) {}
|
|
|
|
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest) returns(milvus.StringResponse){}
|
|
|
|
rpc CreateIndex(CreateIndexRequest) returns (common.Status){}
|
|
|
|
rpc AlterIndex(AlterIndexRequest) returns (common.Status){}
|
|
|
|
// Deprecated: use DescribeIndex instead
|
|
|
|
rpc GetIndexState(GetIndexStateRequest) returns (GetIndexStateResponse) {}
|
|
|
|
rpc GetSegmentIndexState(GetSegmentIndexStateRequest) returns (GetSegmentIndexStateResponse) {}
|
|
|
|
rpc GetIndexInfos(GetIndexInfoRequest) returns (GetIndexInfoResponse){}
|
|
|
|
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
|
|
|
|
rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
|
|
|
|
rpc GetIndexStatistics(GetIndexStatisticsRequest) returns (GetIndexStatisticsResponse) {}
|
|
|
|
// Deprecated: use DescribeIndex instead
|
|
|
|
rpc GetIndexBuildProgress(GetIndexBuildProgressRequest) returns (GetIndexBuildProgressResponse) {}
|
2023-12-13 17:24:38 +08:00
|
|
|
|
|
|
|
rpc ShowConfigurations(internal.ShowConfigurationsRequest)
|
|
|
|
returns (internal.ShowConfigurationsResponse) {
|
|
|
|
}
|
|
|
|
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
|
|
|
|
rpc GetMetrics(milvus.GetMetricsRequest)
|
|
|
|
returns (milvus.GetMetricsResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc CheckHealth(milvus.CheckHealthRequest)
|
|
|
|
returns (milvus.CheckHealthResponse) {
|
|
|
|
}
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
service IndexNode {
|
2023-12-13 17:24:38 +08:00
|
|
|
rpc GetComponentStates(milvus.GetComponentStatesRequest)
|
|
|
|
returns (milvus.ComponentStates) {
|
|
|
|
}
|
|
|
|
rpc GetStatisticsChannel(internal.GetStatisticsChannelRequest)
|
|
|
|
returns (milvus.StringResponse) {
|
|
|
|
}
|
|
|
|
rpc CreateJob(CreateJobRequest) returns (common.Status) {
|
|
|
|
}
|
|
|
|
rpc QueryJobs(QueryJobsRequest) returns (QueryJobsResponse) {
|
|
|
|
}
|
|
|
|
rpc DropJobs(DropJobsRequest) returns (common.Status) {
|
|
|
|
}
|
|
|
|
rpc GetJobStats(GetJobStatsRequest) returns (GetJobStatsResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc ShowConfigurations(internal.ShowConfigurationsRequest)
|
|
|
|
returns (internal.ShowConfigurationsResponse) {
|
|
|
|
}
|
|
|
|
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
|
|
|
|
rpc GetMetrics(milvus.GetMetricsRequest)
|
|
|
|
returns (milvus.GetMetricsResponse) {
|
|
|
|
}
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message IndexInfo {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
int64 fieldID = 2;
|
|
|
|
string index_name = 3;
|
|
|
|
int64 indexID = 4;
|
|
|
|
repeated common.KeyValuePair type_params = 5;
|
|
|
|
repeated common.KeyValuePair index_params = 6;
|
|
|
|
// index build progress
|
|
|
|
// The real-time statistics may not be expected due to the existence of the compaction mechanism.
|
|
|
|
int64 indexed_rows = 7;
|
|
|
|
int64 total_rows = 8;
|
|
|
|
// index state
|
|
|
|
common.IndexState state = 9;
|
|
|
|
string index_state_fail_reason = 10;
|
|
|
|
bool is_auto_index = 11;
|
|
|
|
repeated common.KeyValuePair user_index_params = 12;
|
|
|
|
int64 pending_index_rows = 13;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message FieldIndex {
|
2023-12-13 17:24:38 +08:00
|
|
|
IndexInfo index_info = 1;
|
|
|
|
bool deleted = 2;
|
|
|
|
uint64 create_time = 3;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentIndex {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
int64 partitionID = 2;
|
|
|
|
int64 segmentID = 3;
|
|
|
|
int64 num_rows = 4;
|
|
|
|
int64 indexID = 5;
|
|
|
|
int64 buildID = 6;
|
|
|
|
int64 nodeID = 7;
|
|
|
|
int64 index_version = 8;
|
|
|
|
common.IndexState state = 9;
|
|
|
|
string fail_reason = 10;
|
|
|
|
repeated string index_file_keys = 11;
|
|
|
|
bool deleted = 12;
|
|
|
|
uint64 create_time = 13;
|
|
|
|
uint64 serialize_size = 14;
|
|
|
|
bool write_handoff = 15;
|
|
|
|
int32 current_index_version = 16;
|
|
|
|
int64 index_store_version = 17;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterNodeRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.MsgBase base = 1;
|
|
|
|
common.Address address = 2;
|
|
|
|
int64 nodeID = 3;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterNodeResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
internal.InitParams init_params = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetIndexStateRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
string index_name = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetIndexStateResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
common.IndexState state = 2;
|
|
|
|
string fail_reason = 3;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetSegmentIndexStateRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
string index_name = 2;
|
|
|
|
repeated int64 segmentIDs = 3;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentIndexState {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 segmentID = 1;
|
|
|
|
common.IndexState state = 2;
|
|
|
|
string fail_reason = 3;
|
2023-12-29 11:44:45 +08:00
|
|
|
string index_name = 4;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetSegmentIndexStateResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated SegmentIndexState states = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateIndexRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
int64 fieldID = 2;
|
|
|
|
string index_name = 3;
|
|
|
|
repeated common.KeyValuePair type_params = 4;
|
|
|
|
repeated common.KeyValuePair index_params = 5;
|
|
|
|
uint64 timestamp = 6;
|
|
|
|
bool is_auto_index = 7;
|
|
|
|
repeated common.KeyValuePair user_index_params = 8;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
2023-12-21 18:07:24 +08:00
|
|
|
message AlterIndexRequest {
|
|
|
|
int64 collectionID = 1;
|
|
|
|
string index_name = 2;
|
|
|
|
repeated common.KeyValuePair params = 3;
|
|
|
|
}
|
|
|
|
|
2023-01-11 14:35:40 +08:00
|
|
|
message GetIndexInfoRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated int64 segmentIDs = 2;
|
|
|
|
string index_name = 3;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message IndexFilePathInfo {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 fieldID = 2;
|
|
|
|
int64 indexID = 3;
|
|
|
|
int64 buildID = 4;
|
|
|
|
string index_name = 5;
|
|
|
|
repeated common.KeyValuePair index_params = 6;
|
|
|
|
repeated string index_file_paths = 7;
|
|
|
|
uint64 serialized_size = 8;
|
|
|
|
int64 index_version = 9;
|
|
|
|
int64 num_rows = 10;
|
|
|
|
int32 current_index_version = 11;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentInfo {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
int64 segmentID = 2;
|
|
|
|
bool enable_index = 3;
|
|
|
|
repeated IndexFilePathInfo index_infos = 4;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetIndexInfoResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
map<int64, SegmentInfo> segment_info = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DropIndexRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
repeated int64 partitionIDs = 2;
|
|
|
|
string index_name = 3;
|
|
|
|
bool drop_all = 4;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeIndexRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
string index_name = 2;
|
|
|
|
uint64 timestamp = 3;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeIndexResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated IndexInfo index_infos = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetIndexBuildProgressRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
string index_name = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetIndexBuildProgressResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
int64 indexed_rows = 2;
|
|
|
|
int64 total_rows = 3;
|
|
|
|
int64 pending_index_rows = 4;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message StorageConfig {
|
2023-12-13 17:24:38 +08:00
|
|
|
string address = 1;
|
|
|
|
string access_keyID = 2;
|
|
|
|
string secret_access_key = 3;
|
|
|
|
bool useSSL = 4;
|
|
|
|
string bucket_name = 5;
|
|
|
|
string root_path = 6;
|
|
|
|
bool useIAM = 7;
|
|
|
|
string IAMEndpoint = 8;
|
|
|
|
string storage_type = 9;
|
|
|
|
bool use_virtual_host = 10;
|
|
|
|
string region = 11;
|
|
|
|
string cloud_provider = 12;
|
|
|
|
int64 request_timeout_ms = 13;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateJobRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
string clusterID = 1;
|
|
|
|
string index_file_prefix = 2;
|
|
|
|
int64 buildID = 3;
|
|
|
|
repeated string data_paths = 4;
|
|
|
|
int64 index_version = 5;
|
|
|
|
int64 indexID = 6;
|
|
|
|
string index_name = 7;
|
|
|
|
StorageConfig storage_config = 8;
|
|
|
|
repeated common.KeyValuePair index_params = 9;
|
|
|
|
repeated common.KeyValuePair type_params = 10;
|
|
|
|
int64 num_rows = 11;
|
|
|
|
int32 current_index_version = 12;
|
|
|
|
int64 collectionID = 13;
|
|
|
|
int64 partitionID = 14;
|
|
|
|
int64 segmentID = 15;
|
|
|
|
int64 fieldID = 16;
|
|
|
|
string field_name = 17;
|
|
|
|
schema.DataType field_type = 18;
|
|
|
|
string store_path = 19;
|
|
|
|
int64 store_version = 20;
|
|
|
|
string index_store_path = 21;
|
|
|
|
int64 dim = 22;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message QueryJobsRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
string clusterID = 1;
|
|
|
|
repeated int64 buildIDs = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message IndexTaskInfo {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 buildID = 1;
|
|
|
|
common.IndexState state = 2;
|
|
|
|
repeated string index_file_keys = 3;
|
|
|
|
uint64 serialized_size = 4;
|
|
|
|
string fail_reason = 5;
|
|
|
|
int32 current_index_version = 6;
|
|
|
|
int64 index_store_version = 7;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message QueryJobsResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
string clusterID = 2;
|
|
|
|
repeated IndexTaskInfo index_infos = 3;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DropJobsRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
string clusterID = 1;
|
|
|
|
repeated int64 buildIDs = 2;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message JobInfo {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 num_rows = 1;
|
|
|
|
int64 dim = 2;
|
|
|
|
int64 start_time = 3;
|
|
|
|
int64 end_time = 4;
|
|
|
|
repeated common.KeyValuePair index_params = 5;
|
|
|
|
int64 podID = 6;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetJobStatsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetJobStatsResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
int64 total_job_num = 2;
|
|
|
|
int64 in_progress_job_num = 3;
|
|
|
|
int64 enqueue_job_num = 4;
|
|
|
|
int64 task_slots = 5;
|
|
|
|
repeated JobInfo job_infos = 6;
|
|
|
|
bool enable_disk = 7;
|
2023-01-11 14:35:40 +08:00
|
|
|
}
|
2023-05-06 10:34:39 +08:00
|
|
|
|
|
|
|
message GetIndexStatisticsRequest {
|
2023-12-13 17:24:38 +08:00
|
|
|
int64 collectionID = 1;
|
|
|
|
string index_name = 2;
|
2023-05-06 10:34:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetIndexStatisticsResponse {
|
2023-12-13 17:24:38 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated IndexInfo index_infos = 2;
|
2023-05-06 10:34:39 +08:00
|
|
|
}
|