milvus/pkg/proto/etcd_meta.proto
Zhen Ye 7c575a18b0
enhance: support AckSyncUp for broadcaster, and enable it in truncate api (#46313)
issue: #43897
also for issue: #46166

add ack_sync_up flag into broadcast message header, which indicates that
whether the broadcast operation is need to be synced up between the
streaming node and the coordinator.
If the ack_sync_up is false, the broadcast operation will be acked once
the recovery storage see the message at current vchannel, the fast ack
operation can be applied to speed up the broadcast operation.
If the ack_sync_up is true, the broadcast operation will be acked after
the checkpoint of current vchannel reach current message.
The fast ack operation can not be applied to speed up the broadcast
operation, because the ack operation need to be synced up with streaming
node.
e.g. if truncate collection operation want to call ack once callback
after the all segment are flushed at current vchannel, it should set the
ack_sync_up to be true.

TODO: current implementation doesn't promise the ack sync up semantic,
it only promise FastAck operation will not be applied, wait for 3.0 to
implement the ack sync up semantic. only for truncate api now.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-12-17 16:55:17 +08:00

135 lines
3.4 KiB
Protocol Buffer

syntax = "proto3";
package milvus.proto.etcd;
option go_package="github.com/milvus-io/milvus/pkg/v2/proto/etcdpb";
import "common.proto";
import "schema.proto";
// this proto only used to describe object that will persist into etcd
message IndexInfo {
string index_name = 1;
int64 indexID = 2;
repeated common.KeyValuePair index_params = 3;
bool deleted = 4;
uint64 create_time = 5;
}
message FieldIndexInfo{
int64 filedID = 1;
int64 indexID = 2;
}
enum DatabaseState {
DatabaseUnknown = 0;
DatabaseCreated = 1;
DatabaseCreating = 2 [deprecated = true];
DatabaseDropping = 3;
DatabaseDropped = 4;
}
enum CollectionState {
CollectionCreated = 0;
CollectionCreating = 1 [deprecated = true];
CollectionDropping = 2;
CollectionDropped = 3;
}
enum PartitionState {
PartitionCreated = 0;
PartitionCreating = 1 [deprecated = true];
PartitionDropping = 2;
PartitionDropped = 3;
}
enum AliasState {
AliasCreated = 0;
AliasCreating = 1 [deprecated = true];
AliasDropping = 2;
AliasDropped = 3;
}
message CollectionInfo {
int64 ID = 1;
schema.CollectionSchema schema = 2;
uint64 create_time = 3;
// deprecate
repeated int64 partitionIDs = 4;
// deprecate
repeated string partitionNames = 5;
// deprecate
repeated FieldIndexInfo field_indexes = 6;
repeated string virtual_channel_names = 7;
repeated string physical_channel_names = 8;
// deprecate
repeated uint64 partition_created_timestamps = 9;
int32 shards_num = 10;
repeated common.KeyDataPair start_positions = 11;
common.ConsistencyLevel consistency_level = 12;
CollectionState state = 13; // To keep compatible with older version, default state is `Created`.
repeated common.KeyValuePair properties = 14;
int64 db_id = 15;
uint64 UpdateTimestamp = 16;
repeated CollectionShardInfo shard_infos = 17; // same length with virtual_channel_names, order one by one.
}
message CollectionShardInfo {
uint64 last_truncate_time_tick = 1; // the last truncate time tick of the shard, if the shard is not truncated, the value is 0.
}
message PartitionInfo {
int64 partitionID = 1;
string partitionName = 2;
uint64 partition_created_timestamp = 3;
int64 collection_id = 4;
PartitionState state = 5; // To keep compatible with older version, default state is `Created`.
}
message AliasInfo {
string alias_name = 1;
int64 collection_id = 2;
uint64 created_time = 3;
AliasState state = 4; // To keep compatible with older version, default state is `Created`.
int64 db_id = 5;
}
message DatabaseInfo {
string tenant_id = 1;
string name = 2;
int64 id = 3;
DatabaseState state = 4;
uint64 created_time = 5;
repeated common.KeyValuePair properties = 6;
}
message SegmentIndexInfo {
int64 collectionID = 1;
int64 partitionID = 2;
int64 segmentID = 3;
int64 fieldID = 4;
int64 indexID = 5;
int64 buildID = 6;
bool enable_index = 7;
uint64 create_time = 8;
}
// TODO move to proto files of interprocess communication
message CollectionMeta {
int64 ID=1;
schema.CollectionSchema schema=2;
uint64 create_time=3;
repeated int64 segmentIDs=4;
repeated string partition_tags=5;
repeated int64 partitionIDs=6;
}
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;
}