milvus/internal/proto/internal.proto
yihao.dai a434d33e75
feat: Add import scheduler and manager (#29367)
This PR introduces novel managerial roles for importv2:
1. ImportMeta: To manage all the import tasks;
2. ImportScheduler: To process tasks and modify their states;
3. ImportChecker: To ascertain the completion of all tasks and instigate
relevant operations.

issue: https://github.com/milvus-io/milvus/issues/28521

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2024-03-01 18:31:02 +08:00

332 lines
7.0 KiB
Protocol Buffer

syntax = "proto3";
package milvus.proto.internal;
option go_package = "github.com/milvus-io/milvus/internal/proto/internalpb";
import "common.proto";
import "schema.proto";
message GetTimeTickChannelRequest {
}
message GetStatisticsChannelRequest {
}
message GetDdChannelRequest {
}
message NodeInfo {
common.Address address = 1;
string role = 2;
}
message InitParams {
int64 nodeID = 1;
repeated common.KeyValuePair start_params = 2;
}
message StringList {
repeated string values = 1;
common.Status status = 2;
}
message GetStatisticsRequest {
common.MsgBase base = 1;
// Not useful for now
int64 dbID = 2;
// The collection you want get statistics
int64 collectionID = 3;
// The partitions you want get statistics
repeated int64 partitionIDs = 4;
// timestamp of the statistics
uint64 travel_timestamp = 5;
uint64 guarantee_timestamp = 6;
uint64 timeout_timestamp = 7;
}
message GetStatisticsResponse {
common.MsgBase base = 1;
// Contain error_code and reason
common.Status status = 2;
// Collection statistics data. Contain pairs like {"row_count": "1"}
repeated common.KeyValuePair stats = 3;
}
message CreateAliasRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string alias = 4;
}
message DropAliasRequest {
common.MsgBase base = 1;
string db_name = 2;
string alias = 3;
}
message AlterAliasRequest{
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string alias = 4;
}
message CreateIndexRequest {
common.MsgBase base = 1;
string db_name = 2;
string collection_name = 3;
string field_name = 4;
int64 dbID = 5;
int64 collectionID = 6;
int64 fieldID = 7;
repeated common.KeyValuePair extra_params = 8;
}
message SearchRequest {
common.MsgBase base = 1;
int64 reqID = 2;
int64 dbID = 3;
int64 collectionID = 4;
repeated int64 partitionIDs = 5;
string dsl = 6;
// serialized `PlaceholderGroup`
bytes placeholder_group = 7;
common.DslType dsl_type = 8;
bytes serialized_expr_plan = 9;
repeated int64 output_fields_id = 10;
uint64 mvcc_timestamp = 11;
uint64 guarantee_timestamp = 12;
uint64 timeout_timestamp = 13;
int64 nq = 14;
int64 topk = 15;
string metricType = 16;
bool ignoreGrowing = 17; // Optional
string username = 18;
}
message HybridSearchRequest {
common.MsgBase base = 1;
int64 reqID = 2;
int64 dbID = 3;
int64 collectionID = 4;
repeated int64 partitionIDs = 5;
repeated SearchRequest reqs = 6;
uint64 mvcc_timestamp = 11;
uint64 guarantee_timestamp = 12;
uint64 timeout_timestamp = 13;
}
message SearchResults {
common.MsgBase base = 1;
common.Status status = 2;
int64 reqID = 3;
string metric_type = 4;
int64 num_queries = 5;
int64 top_k = 6;
repeated int64 sealed_segmentIDs_searched = 7;
repeated string channelIDs_searched = 8;
repeated int64 global_sealed_segmentIDs = 9;
// schema.SearchResultsData inside
bytes sliced_blob = 10;
int64 sliced_num_count = 11;
int64 sliced_offset = 12;
// search request cost
CostAggregation costAggregation = 13;
map<string, uint64> channels_mvcc = 14;
}
message CostAggregation {
int64 responseTime = 1;
int64 serviceTime = 2;
int64 totalNQ = 3;
}
message RetrieveRequest {
common.MsgBase base = 1;
int64 reqID = 2;
int64 dbID = 3;
int64 collectionID = 4;
repeated int64 partitionIDs = 5;
bytes serialized_expr_plan = 6;
repeated int64 output_fields_id = 7;
uint64 mvcc_timestamp = 8;
uint64 guarantee_timestamp = 9;
uint64 timeout_timestamp = 10;
int64 limit = 11; // Optional
bool ignoreGrowing = 12;
bool is_count = 13;
int64 iteration_extension_reduce_rate = 14;
string username = 15;
bool reduce_stop_for_best = 16;
}
message RetrieveResults {
common.MsgBase base = 1;
common.Status status = 2;
int64 reqID = 3;
schema.IDs ids = 4;
repeated schema.FieldData fields_data = 5;
repeated int64 sealed_segmentIDs_retrieved = 6;
repeated string channelIDs_retrieved = 7;
repeated int64 global_sealed_segmentIDs = 8;
// query request cost
CostAggregation costAggregation = 13;
}
message LoadIndex {
common.MsgBase base = 1;
int64 segmentID = 2;
string fieldName = 3;
int64 fieldID = 4;
repeated string index_paths = 5;
repeated common.KeyValuePair index_params = 6;
}
message IndexStats {
repeated common.KeyValuePair index_params = 1;
int64 num_related_segments = 2;
}
message FieldStats {
int64 collectionID = 1;
int64 fieldID = 2;
repeated IndexStats index_stats = 3;
}
message SegmentStats {
int64 segmentID = 1;
int64 memory_size = 2;
int64 num_rows = 3;
bool recently_modified = 4;
}
message ChannelTimeTickMsg {
common.MsgBase base = 1;
repeated string channelNames = 2;
repeated uint64 timestamps = 3;
uint64 default_timestamp = 4;
}
message CredentialInfo {
string username = 1;
// encrypted by bcrypt (for higher security level)
string encrypted_password = 2;
string tenant = 3;
bool is_super = 4;
// encrypted by sha256 (for good performance in cache mapping)
string sha256_password = 5;
}
message ListPolicyRequest {
// Not useful for now
common.MsgBase base = 1;
}
message ListPolicyResponse {
// Contain error_code and reason
common.Status status = 1;
repeated string policy_infos = 2;
repeated string user_roles = 3;
}
message ShowConfigurationsRequest {
common.MsgBase base = 1;
string pattern = 2;
}
message ShowConfigurationsResponse {
common.Status status = 1;
repeated common.KeyValuePair configuations = 2;
}
enum RateType {
DDLCollection = 0;
DDLPartition = 1;
DDLIndex = 2;
DDLFlush = 3;
DDLCompaction = 4;
DMLInsert = 5;
DMLDelete = 6;
DMLBulkLoad = 7;
DQLSearch = 8;
DQLQuery = 9;
DMLUpsert = 10;
}
message Rate {
RateType rt = 1;
double r = 2;
}
enum ImportJobState {
None = 0;
Pending = 1;
PreImporting = 2;
Importing = 3;
Failed = 4;
Completed = 5;
}
message ImportFile {
int64 id = 1;
// A singular row-based file or multiple column-based files.
repeated string paths = 2;
}
message ImportRequestInternal {
int64 dbID = 1;
int64 collectionID = 2;
repeated int64 partitionIDs = 3;
repeated string channel_names = 4;
schema.CollectionSchema schema = 5;
repeated ImportFile files = 6;
repeated common.KeyValuePair options = 7;
}
message ImportRequest {
string db_name = 1;
string collection_name = 2;
string partition_name = 3;
repeated ImportFile files = 4;
repeated common.KeyValuePair options = 5;
}
message ImportResponse {
common.Status status = 1;
string jobID = 2;
}
message GetImportProgressRequest {
string db_name = 1;
string jobID = 2;
}
message GetImportProgressResponse {
common.Status status = 1;
ImportJobState state = 2;
string reason = 3;
int64 progress = 4;
}
message ListImportsRequestInternal {
int64 dbID = 1;
int64 collectionID = 2;
}
message ListImportsRequest {
string db_name = 1;
string collection_name = 2;
}
message ListImportsResponse {
common.Status status = 1;
repeated string jobIDs = 2;
repeated ImportJobState states = 3;
repeated string reasons = 4;
repeated int64 progresses = 5;
}