diff --git a/internal/core/src/pb/etcd_meta.pb.cc b/internal/core/src/pb/etcd_meta.pb.cc index 8f4a55a30e..77739f9c0e 100644 --- a/internal/core/src/pb/etcd_meta.pb.cc +++ b/internal/core/src/pb/etcd_meta.pb.cc @@ -17,7 +17,6 @@ #include extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Address_common_2eproto; extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyValuePair_common_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_etcd_5fmeta_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldBinlogFiles_etcd_5fmeta_2eproto; extern PROTOBUF_INTERNAL_EXPORT_etcd_5fmeta_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldIndexInfo_etcd_5fmeta_2eproto; extern PROTOBUF_INTERNAL_EXPORT_schema_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CollectionSchema_schema_2eproto; namespace milvus { @@ -31,10 +30,6 @@ class ProxyMetaDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ProxyMeta_default_instance_; -class PartitionInfoDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _PartitionInfo_default_instance_; class IndexInfoDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; @@ -55,18 +50,6 @@ class CollectionMetaDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _CollectionMeta_default_instance_; -class FieldBinlogFilesDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _FieldBinlogFiles_default_instance_; -class SegmentMetaDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _SegmentMeta_default_instance_; -class FieldIndexMetaDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _FieldIndexMeta_default_instance_; } // namespace etcd } // namespace proto } // namespace milvus @@ -101,20 +84,6 @@ static void InitDefaultsscc_info_CollectionMeta_etcd_5fmeta_2eproto() { {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_CollectionMeta_etcd_5fmeta_2eproto}, { &scc_info_CollectionSchema_schema_2eproto.base,}}; -static void InitDefaultsscc_info_FieldBinlogFiles_etcd_5fmeta_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::proto::etcd::_FieldBinlogFiles_default_instance_; - new (ptr) ::milvus::proto::etcd::FieldBinlogFiles(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::proto::etcd::FieldBinlogFiles::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldBinlogFiles_etcd_5fmeta_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_FieldBinlogFiles_etcd_5fmeta_2eproto}, {}}; - static void InitDefaultsscc_info_FieldIndexInfo_etcd_5fmeta_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -129,21 +98,6 @@ static void InitDefaultsscc_info_FieldIndexInfo_etcd_5fmeta_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldIndexInfo_etcd_5fmeta_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_FieldIndexInfo_etcd_5fmeta_2eproto}, {}}; -static void InitDefaultsscc_info_FieldIndexMeta_etcd_5fmeta_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::proto::etcd::_FieldIndexMeta_default_instance_; - new (ptr) ::milvus::proto::etcd::FieldIndexMeta(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::proto::etcd::FieldIndexMeta::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldIndexMeta_etcd_5fmeta_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_FieldIndexMeta_etcd_5fmeta_2eproto}, { - &scc_info_KeyValuePair_common_2eproto.base,}}; - static void InitDefaultsscc_info_IndexInfo_etcd_5fmeta_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -159,20 +113,6 @@ static void InitDefaultsscc_info_IndexInfo_etcd_5fmeta_2eproto() { {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_IndexInfo_etcd_5fmeta_2eproto}, { &scc_info_KeyValuePair_common_2eproto.base,}}; -static void InitDefaultsscc_info_PartitionInfo_etcd_5fmeta_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::proto::etcd::_PartitionInfo_default_instance_; - new (ptr) ::milvus::proto::etcd::PartitionInfo(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::proto::etcd::PartitionInfo::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PartitionInfo_etcd_5fmeta_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_PartitionInfo_etcd_5fmeta_2eproto}, {}}; - static void InitDefaultsscc_info_ProxyMeta_etcd_5fmeta_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -202,21 +142,6 @@ static void InitDefaultsscc_info_SegmentIndexInfo_etcd_5fmeta_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SegmentIndexInfo_etcd_5fmeta_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SegmentIndexInfo_etcd_5fmeta_2eproto}, {}}; -static void InitDefaultsscc_info_SegmentMeta_etcd_5fmeta_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::milvus::proto::etcd::_SegmentMeta_default_instance_; - new (ptr) ::milvus::proto::etcd::SegmentMeta(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::milvus::proto::etcd::SegmentMeta::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SegmentMeta_etcd_5fmeta_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SegmentMeta_etcd_5fmeta_2eproto}, { - &scc_info_FieldBinlogFiles_etcd_5fmeta_2eproto.base,}}; - static void InitDefaultsscc_info_TenantMeta_etcd_5fmeta_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -231,7 +156,7 @@ static void InitDefaultsscc_info_TenantMeta_etcd_5fmeta_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TenantMeta_etcd_5fmeta_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_TenantMeta_etcd_5fmeta_2eproto}, {}}; -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_etcd_5fmeta_2eproto[11]; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_etcd_5fmeta_2eproto[7]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_etcd_5fmeta_2eproto = nullptr; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_etcd_5fmeta_2eproto = nullptr; @@ -254,14 +179,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_etcd_5fmeta_2eproto::offsets[] PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::ProxyMeta, address_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::ProxyMeta, result_channelids_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::PartitionInfo, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::PartitionInfo, partition_name_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::PartitionInfo, partitionid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::PartitionInfo, segmentids_), - ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::IndexInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -285,6 +202,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_etcd_5fmeta_2eproto::offsets[] PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionInfo, schema_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionInfo, create_time_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionInfo, partitionids_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionInfo, partitonnames_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionInfo, field_indexes_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionInfo, virtual_channel_names_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionInfo, physical_channel_names_), @@ -309,66 +227,25 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_etcd_5fmeta_2eproto::offsets[] PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionMeta, segmentids_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionMeta, partition_tags_), PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::CollectionMeta, partitionids_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldBinlogFiles, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldBinlogFiles, fieldid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldBinlogFiles, binlog_files_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, segmentid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, collectionid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, partition_tag_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, channel_start_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, channel_end_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, open_time_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, close_time_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, num_rows_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, mem_size_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::SegmentMeta, binlog_file_paths_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, segmentid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, fieldid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, indexid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, index_params_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, state_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::etcd::FieldIndexMeta, index_file_paths_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::milvus::proto::etcd::TenantMeta)}, { 9, -1, sizeof(::milvus::proto::etcd::ProxyMeta)}, - { 17, -1, sizeof(::milvus::proto::etcd::PartitionInfo)}, - { 25, -1, sizeof(::milvus::proto::etcd::IndexInfo)}, - { 33, -1, sizeof(::milvus::proto::etcd::FieldIndexInfo)}, - { 40, -1, sizeof(::milvus::proto::etcd::CollectionInfo)}, - { 52, -1, sizeof(::milvus::proto::etcd::SegmentIndexInfo)}, - { 62, -1, sizeof(::milvus::proto::etcd::CollectionMeta)}, - { 73, -1, sizeof(::milvus::proto::etcd::FieldBinlogFiles)}, - { 80, -1, sizeof(::milvus::proto::etcd::SegmentMeta)}, - { 95, -1, sizeof(::milvus::proto::etcd::FieldIndexMeta)}, + { 17, -1, sizeof(::milvus::proto::etcd::IndexInfo)}, + { 25, -1, sizeof(::milvus::proto::etcd::FieldIndexInfo)}, + { 32, -1, sizeof(::milvus::proto::etcd::CollectionInfo)}, + { 45, -1, sizeof(::milvus::proto::etcd::SegmentIndexInfo)}, + { 55, -1, sizeof(::milvus::proto::etcd::CollectionMeta)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { reinterpret_cast(&::milvus::proto::etcd::_TenantMeta_default_instance_), reinterpret_cast(&::milvus::proto::etcd::_ProxyMeta_default_instance_), - reinterpret_cast(&::milvus::proto::etcd::_PartitionInfo_default_instance_), reinterpret_cast(&::milvus::proto::etcd::_IndexInfo_default_instance_), reinterpret_cast(&::milvus::proto::etcd::_FieldIndexInfo_default_instance_), reinterpret_cast(&::milvus::proto::etcd::_CollectionInfo_default_instance_), reinterpret_cast(&::milvus::proto::etcd::_SegmentIndexInfo_default_instance_), reinterpret_cast(&::milvus::proto::etcd::_CollectionMeta_default_instance_), - reinterpret_cast(&::milvus::proto::etcd::_FieldBinlogFiles_default_instance_), - reinterpret_cast(&::milvus::proto::etcd::_SegmentMeta_default_instance_), - reinterpret_cast(&::milvus::proto::etcd::_FieldIndexMeta_default_instance_), }; const char descriptor_table_protodef_etcd_5fmeta_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = @@ -378,66 +255,48 @@ const char descriptor_table_protodef_etcd_5fmeta_2eproto[] PROTOBUF_SECTION_VARI "nsert_channelIDs\030\003 \003(\t\022\027\n\017query_channelI" "D\030\004 \001(\t\"a\n\tProxyMeta\022\n\n\002ID\030\001 \001(\003\022-\n\007addr" "ess\030\002 \001(\0132\034.milvus.proto.common.Address\022" - "\031\n\021result_channelIDs\030\003 \003(\t\"P\n\rPartitionI" - "nfo\022\026\n\016partition_name\030\001 \001(\t\022\023\n\013partition" - "ID\030\002 \001(\003\022\022\n\nsegmentIDs\030\003 \003(\003\"i\n\tIndexInf" - "o\022\022\n\nindex_name\030\001 \001(\t\022\017\n\007indexID\030\002 \001(\003\0227" - "\n\014index_params\030\003 \003(\0132!.milvus.proto.comm" - "on.KeyValuePair\"2\n\016FieldIndexInfo\022\017\n\007fil" - "edID\030\001 \001(\003\022\017\n\007indexID\030\002 \001(\003\"\367\001\n\016Collecti" - "onInfo\022\n\n\002ID\030\001 \001(\003\0225\n\006schema\030\002 \001(\0132%.mil" - "vus.proto.schema.CollectionSchema\022\023\n\013cre" - "ate_time\030\003 \001(\004\022\024\n\014partitionIDs\030\004 \003(\003\0228\n\r" - "field_indexes\030\005 \003(\0132!.milvus.proto.etcd." - "FieldIndexInfo\022\035\n\025virtual_channel_names\030" - "\006 \003(\t\022\036\n\026physical_channel_names\030\007 \003(\t\"n\n" - "\020SegmentIndexInfo\022\021\n\tsegmentID\030\001 \001(\003\022\017\n\007" - "fieldID\030\002 \001(\003\022\017\n\007indexID\030\003 \001(\003\022\017\n\007buildI" - "D\030\004 \001(\003\022\024\n\014enable_index\030\005 \001(\010\"\252\001\n\016Collec" - "tionMeta\022\n\n\002ID\030\001 \001(\003\0225\n\006schema\030\002 \001(\0132%.m" - "ilvus.proto.schema.CollectionSchema\022\023\n\013c" - "reate_time\030\003 \001(\004\022\022\n\nsegmentIDs\030\004 \003(\003\022\026\n\016" - "partition_tags\030\005 \003(\t\022\024\n\014partitionIDs\030\006 \003" - "(\003\"9\n\020FieldBinlogFiles\022\017\n\007fieldID\030\001 \001(\003\022" - "\024\n\014binlog_files\030\002 \003(\t\"\204\002\n\013SegmentMeta\022\021\n" - "\tsegmentID\030\001 \001(\003\022\024\n\014collectionID\030\002 \001(\003\022\025" - "\n\rpartition_tag\030\003 \001(\t\022\025\n\rchannel_start\030\004" - " \001(\005\022\023\n\013channel_end\030\005 \001(\005\022\021\n\topen_time\030\006" - " \001(\004\022\022\n\nclose_time\030\007 \001(\004\022\020\n\010num_rows\030\010 \001" - "(\003\022\020\n\010mem_size\030\t \001(\003\022>\n\021binlog_file_path" - "s\030\n \003(\0132#.milvus.proto.etcd.FieldBinlogF" - "iles\"\310\001\n\016FieldIndexMeta\022\021\n\tsegmentID\030\001 \001" - "(\003\022\017\n\007fieldID\030\002 \001(\003\022\017\n\007indexID\030\003 \001(\003\0227\n\014" - "index_params\030\004 \003(\0132!.milvus.proto.common" - ".KeyValuePair\022.\n\005state\030\005 \001(\0162\037.milvus.pr" - "oto.common.IndexState\022\030\n\020index_file_path" - "s\030\006 \003(\tB3Z1github.com/milvus-io/milvus/i" - "nternal/proto/etcdpbb\006proto3" + "\031\n\021result_channelIDs\030\003 \003(\t\"i\n\tIndexInfo\022" + "\022\n\nindex_name\030\001 \001(\t\022\017\n\007indexID\030\002 \001(\003\0227\n\014" + "index_params\030\003 \003(\0132!.milvus.proto.common" + ".KeyValuePair\"2\n\016FieldIndexInfo\022\017\n\007filed" + "ID\030\001 \001(\003\022\017\n\007indexID\030\002 \001(\003\"\216\002\n\016Collection" + "Info\022\n\n\002ID\030\001 \001(\003\0225\n\006schema\030\002 \001(\0132%.milvu" + "s.proto.schema.CollectionSchema\022\023\n\013creat" + "e_time\030\003 \001(\004\022\024\n\014partitionIDs\030\004 \003(\003\022\025\n\rpa" + "rtitonNames\030\005 \003(\t\0228\n\rfield_indexes\030\006 \003(\013" + "2!.milvus.proto.etcd.FieldIndexInfo\022\035\n\025v" + "irtual_channel_names\030\007 \003(\t\022\036\n\026physical_c" + "hannel_names\030\010 \003(\t\"n\n\020SegmentIndexInfo\022\021" + "\n\tsegmentID\030\001 \001(\003\022\017\n\007fieldID\030\002 \001(\003\022\017\n\007in" + "dexID\030\003 \001(\003\022\017\n\007buildID\030\004 \001(\003\022\024\n\014enable_i" + "ndex\030\005 \001(\010\"\252\001\n\016CollectionMeta\022\n\n\002ID\030\001 \001(" + "\003\0225\n\006schema\030\002 \001(\0132%.milvus.proto.schema." + "CollectionSchema\022\023\n\013create_time\030\003 \001(\004\022\022\n" + "\nsegmentIDs\030\004 \003(\003\022\026\n\016partition_tags\030\005 \003(" + "\t\022\024\n\014partitionIDs\030\006 \003(\003B3Z1github.com/mi" + "lvus-io/milvus/internal/proto/etcdpbb\006pr" + "oto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_etcd_5fmeta_2eproto_deps[2] = { &::descriptor_table_common_2eproto, &::descriptor_table_schema_2eproto, }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_etcd_5fmeta_2eproto_sccs[11] = { +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_etcd_5fmeta_2eproto_sccs[7] = { &scc_info_CollectionInfo_etcd_5fmeta_2eproto.base, &scc_info_CollectionMeta_etcd_5fmeta_2eproto.base, - &scc_info_FieldBinlogFiles_etcd_5fmeta_2eproto.base, &scc_info_FieldIndexInfo_etcd_5fmeta_2eproto.base, - &scc_info_FieldIndexMeta_etcd_5fmeta_2eproto.base, &scc_info_IndexInfo_etcd_5fmeta_2eproto.base, - &scc_info_PartitionInfo_etcd_5fmeta_2eproto.base, &scc_info_ProxyMeta_etcd_5fmeta_2eproto.base, &scc_info_SegmentIndexInfo_etcd_5fmeta_2eproto.base, - &scc_info_SegmentMeta_etcd_5fmeta_2eproto.base, &scc_info_TenantMeta_etcd_5fmeta_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_etcd_5fmeta_2eproto_once; static bool descriptor_table_etcd_5fmeta_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_etcd_5fmeta_2eproto = { - &descriptor_table_etcd_5fmeta_2eproto_initialized, descriptor_table_protodef_etcd_5fmeta_2eproto, "etcd_meta.proto", 1628, - &descriptor_table_etcd_5fmeta_2eproto_once, descriptor_table_etcd_5fmeta_2eproto_sccs, descriptor_table_etcd_5fmeta_2eproto_deps, 11, 2, + &descriptor_table_etcd_5fmeta_2eproto_initialized, descriptor_table_protodef_etcd_5fmeta_2eproto, "etcd_meta.proto", 1044, + &descriptor_table_etcd_5fmeta_2eproto_once, descriptor_table_etcd_5fmeta_2eproto_sccs, descriptor_table_etcd_5fmeta_2eproto_deps, 7, 2, schemas, file_default_instances, TableStruct_etcd_5fmeta_2eproto::offsets, - file_level_metadata_etcd_5fmeta_2eproto, 11, file_level_enum_descriptors_etcd_5fmeta_2eproto, file_level_service_descriptors_etcd_5fmeta_2eproto, + file_level_metadata_etcd_5fmeta_2eproto, 7, file_level_enum_descriptors_etcd_5fmeta_2eproto, file_level_service_descriptors_etcd_5fmeta_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. @@ -1243,388 +1102,6 @@ void ProxyMeta::InternalSwap(ProxyMeta* other) { } -// =================================================================== - -void PartitionInfo::InitAsDefaultInstance() { -} -class PartitionInfo::_Internal { - public: -}; - -PartitionInfo::PartitionInfo() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.proto.etcd.PartitionInfo) -} -PartitionInfo::PartitionInfo(const PartitionInfo& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - segmentids_(from.segmentids_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - partition_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from.partition_name().empty()) { - partition_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.partition_name_); - } - partitionid_ = from.partitionid_; - // @@protoc_insertion_point(copy_constructor:milvus.proto.etcd.PartitionInfo) -} - -void PartitionInfo::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PartitionInfo_etcd_5fmeta_2eproto.base); - partition_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - partitionid_ = PROTOBUF_LONGLONG(0); -} - -PartitionInfo::~PartitionInfo() { - // @@protoc_insertion_point(destructor:milvus.proto.etcd.PartitionInfo) - SharedDtor(); -} - -void PartitionInfo::SharedDtor() { - partition_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void PartitionInfo::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const PartitionInfo& PartitionInfo::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PartitionInfo_etcd_5fmeta_2eproto.base); - return *internal_default_instance(); -} - - -void PartitionInfo::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.proto.etcd.PartitionInfo) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - segmentids_.Clear(); - partition_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - partitionid_ = PROTOBUF_LONGLONG(0); - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* PartitionInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string partition_name = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_partition_name(), ptr, ctx, "milvus.proto.etcd.PartitionInfo.partition_name"); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int64 partitionID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - partitionid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated int64 segmentIDs = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_segmentids(), ptr, ctx); - CHK_(ptr); - } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) { - add_segmentids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool PartitionInfo::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:milvus.proto.etcd.PartitionInfo) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string partition_name = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_partition_name())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_name().data(), static_cast(this->partition_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.proto.etcd.PartitionInfo.partition_name")); - } else { - goto handle_unusual; - } - break; - } - - // int64 partitionID = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &partitionid_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated int64 segmentIDs = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, this->mutable_segmentids()))); - } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - 1, 26u, input, this->mutable_segmentids()))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:milvus.proto.etcd.PartitionInfo) - return true; -failure: - // @@protoc_insertion_point(parse_failure:milvus.proto.etcd.PartitionInfo) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void PartitionInfo::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:milvus.proto.etcd.PartitionInfo) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string partition_name = 1; - if (this->partition_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_name().data(), static_cast(this->partition_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.PartitionInfo.partition_name"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->partition_name(), output); - } - - // int64 partitionID = 2; - if (this->partitionid() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->partitionid(), output); - } - - // repeated int64 segmentIDs = 3; - if (this->segmentids_size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(3, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_segmentids_cached_byte_size_.load( - std::memory_order_relaxed)); - } - for (int i = 0, n = this->segmentids_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( - this->segmentids(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:milvus.proto.etcd.PartitionInfo) -} - -::PROTOBUF_NAMESPACE_ID::uint8* PartitionInfo::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.etcd.PartitionInfo) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string partition_name = 1; - if (this->partition_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_name().data(), static_cast(this->partition_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.PartitionInfo.partition_name"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 1, this->partition_name(), target); - } - - // int64 partitionID = 2; - if (this->partitionid() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->partitionid(), target); - } - - // repeated int64 segmentIDs = 3; - if (this->segmentids_size() > 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( - 3, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( - _segmentids_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt64NoTagToArray(this->segmentids_, target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.etcd.PartitionInfo) - return target; -} - -size_t PartitionInfo::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.proto.etcd.PartitionInfo) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated int64 segmentIDs = 3; - { - size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - Int64Size(this->segmentids_); - if (data_size > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); - _segmentids_cached_byte_size_.store(cached_size, - std::memory_order_relaxed); - total_size += data_size; - } - - // string partition_name = 1; - if (this->partition_name().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->partition_name()); - } - - // int64 partitionID = 2; - if (this->partitionid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->partitionid()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void PartitionInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.etcd.PartitionInfo) - GOOGLE_DCHECK_NE(&from, this); - const PartitionInfo* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.etcd.PartitionInfo) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.etcd.PartitionInfo) - MergeFrom(*source); - } -} - -void PartitionInfo::MergeFrom(const PartitionInfo& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.etcd.PartitionInfo) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - segmentids_.MergeFrom(from.segmentids_); - if (from.partition_name().size() > 0) { - - partition_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.partition_name_); - } - if (from.partitionid() != 0) { - set_partitionid(from.partitionid()); - } -} - -void PartitionInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.etcd.PartitionInfo) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void PartitionInfo::CopyFrom(const PartitionInfo& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.etcd.PartitionInfo) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool PartitionInfo::IsInitialized() const { - return true; -} - -void PartitionInfo::InternalSwap(PartitionInfo* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - segmentids_.InternalSwap(&other->segmentids_); - partition_name_.Swap(&other->partition_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(partitionid_, other->partitionid_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata PartitionInfo::GetMetadata() const { - return GetMetadataStatic(); -} - - // =================================================================== void IndexInfo::InitAsDefaultInstance() { @@ -2322,6 +1799,7 @@ CollectionInfo::CollectionInfo(const CollectionInfo& from) : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), partitionids_(from.partitionids_), + partitonnames_(from.partitonnames_), field_indexes_(from.field_indexes_), virtual_channel_names_(from.virtual_channel_names_), physical_channel_names_(from.physical_channel_names_) { @@ -2369,6 +1847,7 @@ void CollectionInfo::Clear() { (void) cached_has_bits; partitionids_.Clear(); + partitonnames_.Clear(); field_indexes_.Clear(); virtual_channel_names_.Clear(); physical_channel_names_.Clear(); @@ -2421,40 +1900,52 @@ const char* CollectionInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE CHK_(ptr); } else goto handle_unusual; continue; - // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 5; + // repeated string partitonNames = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partitonnames(), ptr, ctx, "milvus.proto.etcd.CollectionInfo.partitonNames"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); + } else goto handle_unusual; + continue; + // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { ptr -= 1; do { ptr += 1; ptr = ctx->ParseMessage(add_field_indexes(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); } else goto handle_unusual; continue; - // repeated string virtual_channel_names = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + // repeated string virtual_channel_names = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { ptr -= 1; do { ptr += 1; ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_virtual_channel_names(), ptr, ctx, "milvus.proto.etcd.CollectionInfo.virtual_channel_names"); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58); } else goto handle_unusual; continue; - // repeated string physical_channel_names = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + // repeated string physical_channel_names = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { ptr -= 1; do { ptr += 1; ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_physical_channel_names(), ptr, ctx, "milvus.proto.etcd.CollectionInfo.physical_channel_names"); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58); + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 66); } else goto handle_unusual; continue; default: { @@ -2540,9 +2031,25 @@ bool CollectionInfo::MergePartialFromCodedStream( break; } - // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 5; + // repeated string partitonNames = 5; case 5: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->add_partitonnames())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partitonnames(this->partitonnames_size() - 1).data(), + static_cast(this->partitonnames(this->partitonnames_size() - 1).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.etcd.CollectionInfo.partitonNames")); + } else { + goto handle_unusual; + } + break; + } + + // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 6; + case 6: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_field_indexes())); } else { @@ -2551,9 +2058,9 @@ bool CollectionInfo::MergePartialFromCodedStream( break; } - // repeated string virtual_channel_names = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + // repeated string virtual_channel_names = 7; + case 7: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_virtual_channel_names())); DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( @@ -2567,9 +2074,9 @@ bool CollectionInfo::MergePartialFromCodedStream( break; } - // repeated string physical_channel_names = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { + // repeated string physical_channel_names = 8; + case 8: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_physical_channel_names())); DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( @@ -2637,33 +2144,43 @@ void CollectionInfo::SerializeWithCachedSizes( this->partitionids(i), output); } - // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 5; + // repeated string partitonNames = 5; + for (int i = 0, n = this->partitonnames_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partitonnames(i).data(), static_cast(this->partitonnames(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.etcd.CollectionInfo.partitonNames"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( + 5, this->partitonnames(i), output); + } + + // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 6; for (unsigned int i = 0, n = static_cast(this->field_indexes_size()); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, + 6, this->field_indexes(static_cast(i)), output); } - // repeated string virtual_channel_names = 6; + // repeated string virtual_channel_names = 7; for (int i = 0, n = this->virtual_channel_names_size(); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->virtual_channel_names(i).data(), static_cast(this->virtual_channel_names(i).length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.proto.etcd.CollectionInfo.virtual_channel_names"); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 6, this->virtual_channel_names(i), output); + 7, this->virtual_channel_names(i), output); } - // repeated string physical_channel_names = 7; + // repeated string physical_channel_names = 8; for (int i = 0, n = this->physical_channel_names_size(); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->physical_channel_names(i).data(), static_cast(this->physical_channel_names(i).length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.proto.etcd.CollectionInfo.physical_channel_names"); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 7, this->physical_channel_names(i), output); + 8, this->physical_channel_names(i), output); } if (_internal_metadata_.have_unknown_fields()) { @@ -2709,32 +2226,42 @@ void CollectionInfo::SerializeWithCachedSizes( WriteInt64NoTagToArray(this->partitionids_, target); } - // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 5; + // repeated string partitonNames = 5; + for (int i = 0, n = this->partitonnames_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->partitonnames(i).data(), static_cast(this->partitonnames(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.etcd.CollectionInfo.partitonNames"); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteStringToArray(5, this->partitonnames(i), target); + } + + // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 6; for (unsigned int i = 0, n = static_cast(this->field_indexes_size()); i < n; i++) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 5, this->field_indexes(static_cast(i)), target); + 6, this->field_indexes(static_cast(i)), target); } - // repeated string virtual_channel_names = 6; + // repeated string virtual_channel_names = 7; for (int i = 0, n = this->virtual_channel_names_size(); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->virtual_channel_names(i).data(), static_cast(this->virtual_channel_names(i).length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.proto.etcd.CollectionInfo.virtual_channel_names"); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(6, this->virtual_channel_names(i), target); + WriteStringToArray(7, this->virtual_channel_names(i), target); } - // repeated string physical_channel_names = 7; + // repeated string physical_channel_names = 8; for (int i = 0, n = this->physical_channel_names_size(); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->physical_channel_names(i).data(), static_cast(this->physical_channel_names(i).length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "milvus.proto.etcd.CollectionInfo.physical_channel_names"); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(7, this->physical_channel_names(i), target); + WriteStringToArray(8, this->physical_channel_names(i), target); } if (_internal_metadata_.have_unknown_fields()) { @@ -2773,7 +2300,15 @@ size_t CollectionInfo::ByteSizeLong() const { total_size += data_size; } - // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 5; + // repeated string partitonNames = 5; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partitonnames_size()); + for (int i = 0, n = this->partitonnames_size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->partitonnames(i)); + } + + // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 6; { unsigned int count = static_cast(this->field_indexes_size()); total_size += 1UL * count; @@ -2784,7 +2319,7 @@ size_t CollectionInfo::ByteSizeLong() const { } } - // repeated string virtual_channel_names = 6; + // repeated string virtual_channel_names = 7; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->virtual_channel_names_size()); for (int i = 0, n = this->virtual_channel_names_size(); i < n; i++) { @@ -2792,7 +2327,7 @@ size_t CollectionInfo::ByteSizeLong() const { this->virtual_channel_names(i)); } - // repeated string physical_channel_names = 7; + // repeated string physical_channel_names = 8; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->physical_channel_names_size()); for (int i = 0, n = this->physical_channel_names_size(); i < n; i++) { @@ -2849,6 +2384,7 @@ void CollectionInfo::MergeFrom(const CollectionInfo& from) { (void) cached_has_bits; partitionids_.MergeFrom(from.partitionids_); + partitonnames_.MergeFrom(from.partitonnames_); field_indexes_.MergeFrom(from.field_indexes_); virtual_channel_names_.MergeFrom(from.virtual_channel_names_); physical_channel_names_.MergeFrom(from.physical_channel_names_); @@ -2885,6 +2421,7 @@ void CollectionInfo::InternalSwap(CollectionInfo* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); partitionids_.InternalSwap(&other->partitionids_); + partitonnames_.InternalSwap(CastToBase(&other->partitonnames_)); CastToBase(&field_indexes_)->InternalSwap(CastToBase(&other->field_indexes_)); virtual_channel_names_.InternalSwap(CastToBase(&other->virtual_channel_names_)); physical_channel_names_.InternalSwap(CastToBase(&other->physical_channel_names_)); @@ -3875,1477 +3412,6 @@ void CollectionMeta::InternalSwap(CollectionMeta* other) { } -// =================================================================== - -void FieldBinlogFiles::InitAsDefaultInstance() { -} -class FieldBinlogFiles::_Internal { - public: -}; - -FieldBinlogFiles::FieldBinlogFiles() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.proto.etcd.FieldBinlogFiles) -} -FieldBinlogFiles::FieldBinlogFiles(const FieldBinlogFiles& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - binlog_files_(from.binlog_files_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - fieldid_ = from.fieldid_; - // @@protoc_insertion_point(copy_constructor:milvus.proto.etcd.FieldBinlogFiles) -} - -void FieldBinlogFiles::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldBinlogFiles_etcd_5fmeta_2eproto.base); - fieldid_ = PROTOBUF_LONGLONG(0); -} - -FieldBinlogFiles::~FieldBinlogFiles() { - // @@protoc_insertion_point(destructor:milvus.proto.etcd.FieldBinlogFiles) - SharedDtor(); -} - -void FieldBinlogFiles::SharedDtor() { -} - -void FieldBinlogFiles::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const FieldBinlogFiles& FieldBinlogFiles::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FieldBinlogFiles_etcd_5fmeta_2eproto.base); - return *internal_default_instance(); -} - - -void FieldBinlogFiles::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.proto.etcd.FieldBinlogFiles) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - binlog_files_.Clear(); - fieldid_ = PROTOBUF_LONGLONG(0); - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FieldBinlogFiles::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // int64 fieldID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - fieldid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string binlog_files = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_binlog_files(), ptr, ctx, "milvus.proto.etcd.FieldBinlogFiles.binlog_files"); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FieldBinlogFiles::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:milvus.proto.etcd.FieldBinlogFiles) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // int64 fieldID = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &fieldid_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated string binlog_files = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_binlog_files())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->binlog_files(this->binlog_files_size() - 1).data(), - static_cast(this->binlog_files(this->binlog_files_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.proto.etcd.FieldBinlogFiles.binlog_files")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:milvus.proto.etcd.FieldBinlogFiles) - return true; -failure: - // @@protoc_insertion_point(parse_failure:milvus.proto.etcd.FieldBinlogFiles) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FieldBinlogFiles::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:milvus.proto.etcd.FieldBinlogFiles) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 fieldID = 1; - if (this->fieldid() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->fieldid(), output); - } - - // repeated string binlog_files = 2; - for (int i = 0, n = this->binlog_files_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->binlog_files(i).data(), static_cast(this->binlog_files(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.FieldBinlogFiles.binlog_files"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 2, this->binlog_files(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:milvus.proto.etcd.FieldBinlogFiles) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FieldBinlogFiles::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.etcd.FieldBinlogFiles) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 fieldID = 1; - if (this->fieldid() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->fieldid(), target); - } - - // repeated string binlog_files = 2; - for (int i = 0, n = this->binlog_files_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->binlog_files(i).data(), static_cast(this->binlog_files(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.FieldBinlogFiles.binlog_files"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(2, this->binlog_files(i), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.etcd.FieldBinlogFiles) - return target; -} - -size_t FieldBinlogFiles::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.proto.etcd.FieldBinlogFiles) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated string binlog_files = 2; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->binlog_files_size()); - for (int i = 0, n = this->binlog_files_size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->binlog_files(i)); - } - - // int64 fieldID = 1; - if (this->fieldid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->fieldid()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void FieldBinlogFiles::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.etcd.FieldBinlogFiles) - GOOGLE_DCHECK_NE(&from, this); - const FieldBinlogFiles* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.etcd.FieldBinlogFiles) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.etcd.FieldBinlogFiles) - MergeFrom(*source); - } -} - -void FieldBinlogFiles::MergeFrom(const FieldBinlogFiles& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.etcd.FieldBinlogFiles) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - binlog_files_.MergeFrom(from.binlog_files_); - if (from.fieldid() != 0) { - set_fieldid(from.fieldid()); - } -} - -void FieldBinlogFiles::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.etcd.FieldBinlogFiles) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FieldBinlogFiles::CopyFrom(const FieldBinlogFiles& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.etcd.FieldBinlogFiles) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FieldBinlogFiles::IsInitialized() const { - return true; -} - -void FieldBinlogFiles::InternalSwap(FieldBinlogFiles* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - binlog_files_.InternalSwap(CastToBase(&other->binlog_files_)); - swap(fieldid_, other->fieldid_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata FieldBinlogFiles::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void SegmentMeta::InitAsDefaultInstance() { -} -class SegmentMeta::_Internal { - public: -}; - -SegmentMeta::SegmentMeta() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.proto.etcd.SegmentMeta) -} -SegmentMeta::SegmentMeta(const SegmentMeta& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - binlog_file_paths_(from.binlog_file_paths_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - partition_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from.partition_tag().empty()) { - partition_tag_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.partition_tag_); - } - ::memcpy(&segmentid_, &from.segmentid_, - static_cast(reinterpret_cast(&mem_size_) - - reinterpret_cast(&segmentid_)) + sizeof(mem_size_)); - // @@protoc_insertion_point(copy_constructor:milvus.proto.etcd.SegmentMeta) -} - -void SegmentMeta::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SegmentMeta_etcd_5fmeta_2eproto.base); - partition_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&segmentid_, 0, static_cast( - reinterpret_cast(&mem_size_) - - reinterpret_cast(&segmentid_)) + sizeof(mem_size_)); -} - -SegmentMeta::~SegmentMeta() { - // @@protoc_insertion_point(destructor:milvus.proto.etcd.SegmentMeta) - SharedDtor(); -} - -void SegmentMeta::SharedDtor() { - partition_tag_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void SegmentMeta::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const SegmentMeta& SegmentMeta::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SegmentMeta_etcd_5fmeta_2eproto.base); - return *internal_default_instance(); -} - - -void SegmentMeta::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.proto.etcd.SegmentMeta) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - binlog_file_paths_.Clear(); - partition_tag_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&segmentid_, 0, static_cast( - reinterpret_cast(&mem_size_) - - reinterpret_cast(&segmentid_)) + sizeof(mem_size_)); - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SegmentMeta::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // int64 segmentID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - segmentid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int64 collectionID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - collectionid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string partition_tag = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_partition_tag(), ptr, ctx, "milvus.proto.etcd.SegmentMeta.partition_tag"); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 channel_start = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - channel_start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 channel_end = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - channel_end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // uint64 open_time = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - open_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // uint64 close_time = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - close_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int64 num_rows = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - num_rows_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int64 mem_size = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - mem_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated .milvus.proto.etcd.FieldBinlogFiles binlog_file_paths = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(add_binlog_file_paths(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 82); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool SegmentMeta::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:milvus.proto.etcd.SegmentMeta) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // int64 segmentID = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &segmentid_))); - } else { - goto handle_unusual; - } - break; - } - - // int64 collectionID = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &collectionid_))); - } else { - goto handle_unusual; - } - break; - } - - // string partition_tag = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->mutable_partition_tag())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag().data(), static_cast(this->partition_tag().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.proto.etcd.SegmentMeta.partition_tag")); - } else { - goto handle_unusual; - } - break; - } - - // int32 channel_start = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &channel_start_))); - } else { - goto handle_unusual; - } - break; - } - - // int32 channel_end = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, &channel_end_))); - } else { - goto handle_unusual; - } - break; - } - - // uint64 open_time = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( - input, &open_time_))); - } else { - goto handle_unusual; - } - break; - } - - // uint64 close_time = 7; - case 7: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( - input, &close_time_))); - } else { - goto handle_unusual; - } - break; - } - - // int64 num_rows = 8; - case 8: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &num_rows_))); - } else { - goto handle_unusual; - } - break; - } - - // int64 mem_size = 9; - case 9: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &mem_size_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .milvus.proto.etcd.FieldBinlogFiles binlog_file_paths = 10; - case 10: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_binlog_file_paths())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:milvus.proto.etcd.SegmentMeta) - return true; -failure: - // @@protoc_insertion_point(parse_failure:milvus.proto.etcd.SegmentMeta) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void SegmentMeta::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:milvus.proto.etcd.SegmentMeta) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 segmentID = 1; - if (this->segmentid() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->segmentid(), output); - } - - // int64 collectionID = 2; - if (this->collectionid() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->collectionid(), output); - } - - // string partition_tag = 3; - if (this->partition_tag().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag().data(), static_cast(this->partition_tag().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.SegmentMeta.partition_tag"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->partition_tag(), output); - } - - // int32 channel_start = 4; - if (this->channel_start() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->channel_start(), output); - } - - // int32 channel_end = 5; - if (this->channel_end() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(5, this->channel_end(), output); - } - - // uint64 open_time = 6; - if (this->open_time() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(6, this->open_time(), output); - } - - // uint64 close_time = 7; - if (this->close_time() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(7, this->close_time(), output); - } - - // int64 num_rows = 8; - if (this->num_rows() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->num_rows(), output); - } - - // int64 mem_size = 9; - if (this->mem_size() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->mem_size(), output); - } - - // repeated .milvus.proto.etcd.FieldBinlogFiles binlog_file_paths = 10; - for (unsigned int i = 0, - n = static_cast(this->binlog_file_paths_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 10, - this->binlog_file_paths(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:milvus.proto.etcd.SegmentMeta) -} - -::PROTOBUF_NAMESPACE_ID::uint8* SegmentMeta::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.etcd.SegmentMeta) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 segmentID = 1; - if (this->segmentid() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->segmentid(), target); - } - - // int64 collectionID = 2; - if (this->collectionid() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->collectionid(), target); - } - - // string partition_tag = 3; - if (this->partition_tag().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->partition_tag().data(), static_cast(this->partition_tag().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.SegmentMeta.partition_tag"); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( - 3, this->partition_tag(), target); - } - - // int32 channel_start = 4; - if (this->channel_start() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->channel_start(), target); - } - - // int32 channel_end = 5; - if (this->channel_end() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->channel_end(), target); - } - - // uint64 open_time = 6; - if (this->open_time() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(6, this->open_time(), target); - } - - // uint64 close_time = 7; - if (this->close_time() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(7, this->close_time(), target); - } - - // int64 num_rows = 8; - if (this->num_rows() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->num_rows(), target); - } - - // int64 mem_size = 9; - if (this->mem_size() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->mem_size(), target); - } - - // repeated .milvus.proto.etcd.FieldBinlogFiles binlog_file_paths = 10; - for (unsigned int i = 0, - n = static_cast(this->binlog_file_paths_size()); i < n; i++) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 10, this->binlog_file_paths(static_cast(i)), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.etcd.SegmentMeta) - return target; -} - -size_t SegmentMeta::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.proto.etcd.SegmentMeta) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .milvus.proto.etcd.FieldBinlogFiles binlog_file_paths = 10; - { - unsigned int count = static_cast(this->binlog_file_paths_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->binlog_file_paths(static_cast(i))); - } - } - - // string partition_tag = 3; - if (this->partition_tag().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->partition_tag()); - } - - // int64 segmentID = 1; - if (this->segmentid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->segmentid()); - } - - // int64 collectionID = 2; - if (this->collectionid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->collectionid()); - } - - // int32 channel_start = 4; - if (this->channel_start() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->channel_start()); - } - - // int32 channel_end = 5; - if (this->channel_end() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->channel_end()); - } - - // uint64 open_time = 6; - if (this->open_time() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( - this->open_time()); - } - - // uint64 close_time = 7; - if (this->close_time() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( - this->close_time()); - } - - // int64 num_rows = 8; - if (this->num_rows() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->num_rows()); - } - - // int64 mem_size = 9; - if (this->mem_size() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->mem_size()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void SegmentMeta::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.etcd.SegmentMeta) - GOOGLE_DCHECK_NE(&from, this); - const SegmentMeta* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.etcd.SegmentMeta) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.etcd.SegmentMeta) - MergeFrom(*source); - } -} - -void SegmentMeta::MergeFrom(const SegmentMeta& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.etcd.SegmentMeta) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - binlog_file_paths_.MergeFrom(from.binlog_file_paths_); - if (from.partition_tag().size() > 0) { - - partition_tag_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.partition_tag_); - } - if (from.segmentid() != 0) { - set_segmentid(from.segmentid()); - } - if (from.collectionid() != 0) { - set_collectionid(from.collectionid()); - } - if (from.channel_start() != 0) { - set_channel_start(from.channel_start()); - } - if (from.channel_end() != 0) { - set_channel_end(from.channel_end()); - } - if (from.open_time() != 0) { - set_open_time(from.open_time()); - } - if (from.close_time() != 0) { - set_close_time(from.close_time()); - } - if (from.num_rows() != 0) { - set_num_rows(from.num_rows()); - } - if (from.mem_size() != 0) { - set_mem_size(from.mem_size()); - } -} - -void SegmentMeta::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.etcd.SegmentMeta) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SegmentMeta::CopyFrom(const SegmentMeta& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.etcd.SegmentMeta) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SegmentMeta::IsInitialized() const { - return true; -} - -void SegmentMeta::InternalSwap(SegmentMeta* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&binlog_file_paths_)->InternalSwap(CastToBase(&other->binlog_file_paths_)); - partition_tag_.Swap(&other->partition_tag_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); - swap(segmentid_, other->segmentid_); - swap(collectionid_, other->collectionid_); - swap(channel_start_, other->channel_start_); - swap(channel_end_, other->channel_end_); - swap(open_time_, other->open_time_); - swap(close_time_, other->close_time_); - swap(num_rows_, other->num_rows_); - swap(mem_size_, other->mem_size_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SegmentMeta::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void FieldIndexMeta::InitAsDefaultInstance() { -} -class FieldIndexMeta::_Internal { - public: -}; - -void FieldIndexMeta::clear_index_params() { - index_params_.Clear(); -} -FieldIndexMeta::FieldIndexMeta() - : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { - SharedCtor(); - // @@protoc_insertion_point(constructor:milvus.proto.etcd.FieldIndexMeta) -} -FieldIndexMeta::FieldIndexMeta(const FieldIndexMeta& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - index_params_(from.index_params_), - index_file_paths_(from.index_file_paths_) { - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::memcpy(&segmentid_, &from.segmentid_, - static_cast(reinterpret_cast(&state_) - - reinterpret_cast(&segmentid_)) + sizeof(state_)); - // @@protoc_insertion_point(copy_constructor:milvus.proto.etcd.FieldIndexMeta) -} - -void FieldIndexMeta::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldIndexMeta_etcd_5fmeta_2eproto.base); - ::memset(&segmentid_, 0, static_cast( - reinterpret_cast(&state_) - - reinterpret_cast(&segmentid_)) + sizeof(state_)); -} - -FieldIndexMeta::~FieldIndexMeta() { - // @@protoc_insertion_point(destructor:milvus.proto.etcd.FieldIndexMeta) - SharedDtor(); -} - -void FieldIndexMeta::SharedDtor() { -} - -void FieldIndexMeta::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const FieldIndexMeta& FieldIndexMeta::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FieldIndexMeta_etcd_5fmeta_2eproto.base); - return *internal_default_instance(); -} - - -void FieldIndexMeta::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.proto.etcd.FieldIndexMeta) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - index_params_.Clear(); - index_file_paths_.Clear(); - ::memset(&segmentid_, 0, static_cast( - reinterpret_cast(&state_) - - reinterpret_cast(&segmentid_)) + sizeof(state_)); - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FieldIndexMeta::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // int64 segmentID = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - segmentid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int64 fieldID = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - fieldid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int64 indexID = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - indexid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated .milvus.proto.common.KeyValuePair index_params = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(add_index_params(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); - } else goto handle_unusual; - continue; - // .milvus.proto.common.IndexState state = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); - CHK_(ptr); - set_state(static_cast<::milvus::proto::common::IndexState>(val)); - } else goto handle_unusual; - continue; - // repeated string index_file_paths = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - ptr -= 1; - do { - ptr += 1; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_index_file_paths(), ptr, ctx, "milvus.proto.etcd.FieldIndexMeta.index_file_paths"); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool FieldIndexMeta::MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - // @@protoc_insertion_point(parse_start:milvus.proto.etcd.FieldIndexMeta) - for (;;) { - ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // int64 segmentID = 1; - case 1: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &segmentid_))); - } else { - goto handle_unusual; - } - break; - } - - // int64 fieldID = 2; - case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &fieldid_))); - } else { - goto handle_unusual; - } - break; - } - - // int64 indexID = 3; - case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - input, &indexid_))); - } else { - goto handle_unusual; - } - break; - } - - // repeated .milvus.proto.common.KeyValuePair index_params = 4; - case 4: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( - input, add_index_params())); - } else { - goto handle_unusual; - } - break; - } - - // .milvus.proto.common.IndexState state = 5; - case 5: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - int value = 0; - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< - int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_state(static_cast< ::milvus::proto::common::IndexState >(value)); - } else { - goto handle_unusual; - } - break; - } - - // repeated string index_file_paths = 6; - case 6: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( - input, this->add_index_file_paths())); - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->index_file_paths(this->index_file_paths_size() - 1).data(), - static_cast(this->index_file_paths(this->index_file_paths_size() - 1).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, - "milvus.proto.etcd.FieldIndexMeta.index_file_paths")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:milvus.proto.etcd.FieldIndexMeta) - return true; -failure: - // @@protoc_insertion_point(parse_failure:milvus.proto.etcd.FieldIndexMeta) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void FieldIndexMeta::SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:milvus.proto.etcd.FieldIndexMeta) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 segmentID = 1; - if (this->segmentid() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->segmentid(), output); - } - - // int64 fieldID = 2; - if (this->fieldid() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->fieldid(), output); - } - - // int64 indexID = 3; - if (this->indexid() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->indexid(), output); - } - - // repeated .milvus.proto.common.KeyValuePair index_params = 4; - for (unsigned int i = 0, - n = static_cast(this->index_params_size()); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->index_params(static_cast(i)), - output); - } - - // .milvus.proto.common.IndexState state = 5; - if (this->state() != 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( - 5, this->state(), output); - } - - // repeated string index_file_paths = 6; - for (int i = 0, n = this->index_file_paths_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->index_file_paths(i).data(), static_cast(this->index_file_paths(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.FieldIndexMeta.index_file_paths"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( - 6, this->index_file_paths(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:milvus.proto.etcd.FieldIndexMeta) -} - -::PROTOBUF_NAMESPACE_ID::uint8* FieldIndexMeta::InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.etcd.FieldIndexMeta) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int64 segmentID = 1; - if (this->segmentid() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->segmentid(), target); - } - - // int64 fieldID = 2; - if (this->fieldid() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->fieldid(), target); - } - - // int64 indexID = 3; - if (this->indexid() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->indexid(), target); - } - - // repeated .milvus.proto.common.KeyValuePair index_params = 4; - for (unsigned int i = 0, - n = static_cast(this->index_params_size()); i < n; i++) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, this->index_params(static_cast(i)), target); - } - - // .milvus.proto.common.IndexState state = 5; - if (this->state() != 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 5, this->state(), target); - } - - // repeated string index_file_paths = 6; - for (int i = 0, n = this->index_file_paths_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->index_file_paths(i).data(), static_cast(this->index_file_paths(i).length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.etcd.FieldIndexMeta.index_file_paths"); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteStringToArray(6, this->index_file_paths(i), target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); - } - // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.etcd.FieldIndexMeta) - return target; -} - -size_t FieldIndexMeta::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.proto.etcd.FieldIndexMeta) - size_t total_size = 0; - - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .milvus.proto.common.KeyValuePair index_params = 4; - { - unsigned int count = static_cast(this->index_params_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - this->index_params(static_cast(i))); - } - } - - // repeated string index_file_paths = 6; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->index_file_paths_size()); - for (int i = 0, n = this->index_file_paths_size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->index_file_paths(i)); - } - - // int64 segmentID = 1; - if (this->segmentid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->segmentid()); - } - - // int64 fieldID = 2; - if (this->fieldid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->fieldid()); - } - - // int64 indexID = 3; - if (this->indexid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( - this->indexid()); - } - - // .milvus.proto.common.IndexState state = 5; - if (this->state() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->state()); - } - - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void FieldIndexMeta::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.etcd.FieldIndexMeta) - GOOGLE_DCHECK_NE(&from, this); - const FieldIndexMeta* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.etcd.FieldIndexMeta) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.etcd.FieldIndexMeta) - MergeFrom(*source); - } -} - -void FieldIndexMeta::MergeFrom(const FieldIndexMeta& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.etcd.FieldIndexMeta) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - index_params_.MergeFrom(from.index_params_); - index_file_paths_.MergeFrom(from.index_file_paths_); - if (from.segmentid() != 0) { - set_segmentid(from.segmentid()); - } - if (from.fieldid() != 0) { - set_fieldid(from.fieldid()); - } - if (from.indexid() != 0) { - set_indexid(from.indexid()); - } - if (from.state() != 0) { - set_state(from.state()); - } -} - -void FieldIndexMeta::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.etcd.FieldIndexMeta) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FieldIndexMeta::CopyFrom(const FieldIndexMeta& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.etcd.FieldIndexMeta) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FieldIndexMeta::IsInitialized() const { - return true; -} - -void FieldIndexMeta::InternalSwap(FieldIndexMeta* other) { - using std::swap; - _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&index_params_)->InternalSwap(CastToBase(&other->index_params_)); - index_file_paths_.InternalSwap(CastToBase(&other->index_file_paths_)); - swap(segmentid_, other->segmentid_); - swap(fieldid_, other->fieldid_); - swap(indexid_, other->indexid_); - swap(state_, other->state_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata FieldIndexMeta::GetMetadata() const { - return GetMetadataStatic(); -} - - // @@protoc_insertion_point(namespace_scope) } // namespace etcd } // namespace proto @@ -5357,9 +3423,6 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::TenantMeta* Arena::CreateMay template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::ProxyMeta* Arena::CreateMaybeMessage< ::milvus::proto::etcd::ProxyMeta >(Arena* arena) { return Arena::CreateInternal< ::milvus::proto::etcd::ProxyMeta >(arena); } -template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::PartitionInfo* Arena::CreateMaybeMessage< ::milvus::proto::etcd::PartitionInfo >(Arena* arena) { - return Arena::CreateInternal< ::milvus::proto::etcd::PartitionInfo >(arena); -} template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::IndexInfo* Arena::CreateMaybeMessage< ::milvus::proto::etcd::IndexInfo >(Arena* arena) { return Arena::CreateInternal< ::milvus::proto::etcd::IndexInfo >(arena); } @@ -5375,15 +3438,6 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::SegmentIndexInfo* Arena::Cre template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::CollectionMeta* Arena::CreateMaybeMessage< ::milvus::proto::etcd::CollectionMeta >(Arena* arena) { return Arena::CreateInternal< ::milvus::proto::etcd::CollectionMeta >(arena); } -template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::FieldBinlogFiles* Arena::CreateMaybeMessage< ::milvus::proto::etcd::FieldBinlogFiles >(Arena* arena) { - return Arena::CreateInternal< ::milvus::proto::etcd::FieldBinlogFiles >(arena); -} -template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::SegmentMeta* Arena::CreateMaybeMessage< ::milvus::proto::etcd::SegmentMeta >(Arena* arena) { - return Arena::CreateInternal< ::milvus::proto::etcd::SegmentMeta >(arena); -} -template<> PROTOBUF_NOINLINE ::milvus::proto::etcd::FieldIndexMeta* Arena::CreateMaybeMessage< ::milvus::proto::etcd::FieldIndexMeta >(Arena* arena) { - return Arena::CreateInternal< ::milvus::proto::etcd::FieldIndexMeta >(arena); -} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/internal/core/src/pb/etcd_meta.pb.h b/internal/core/src/pb/etcd_meta.pb.h index 1d946281c6..3d27676b00 100644 --- a/internal/core/src/pb/etcd_meta.pb.h +++ b/internal/core/src/pb/etcd_meta.pb.h @@ -49,7 +49,7 @@ struct TableStruct_etcd_5fmeta_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[11] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[7] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; @@ -65,30 +65,18 @@ extern CollectionInfoDefaultTypeInternal _CollectionInfo_default_instance_; class CollectionMeta; class CollectionMetaDefaultTypeInternal; extern CollectionMetaDefaultTypeInternal _CollectionMeta_default_instance_; -class FieldBinlogFiles; -class FieldBinlogFilesDefaultTypeInternal; -extern FieldBinlogFilesDefaultTypeInternal _FieldBinlogFiles_default_instance_; class FieldIndexInfo; class FieldIndexInfoDefaultTypeInternal; extern FieldIndexInfoDefaultTypeInternal _FieldIndexInfo_default_instance_; -class FieldIndexMeta; -class FieldIndexMetaDefaultTypeInternal; -extern FieldIndexMetaDefaultTypeInternal _FieldIndexMeta_default_instance_; class IndexInfo; class IndexInfoDefaultTypeInternal; extern IndexInfoDefaultTypeInternal _IndexInfo_default_instance_; -class PartitionInfo; -class PartitionInfoDefaultTypeInternal; -extern PartitionInfoDefaultTypeInternal _PartitionInfo_default_instance_; class ProxyMeta; class ProxyMetaDefaultTypeInternal; extern ProxyMetaDefaultTypeInternal _ProxyMeta_default_instance_; class SegmentIndexInfo; class SegmentIndexInfoDefaultTypeInternal; extern SegmentIndexInfoDefaultTypeInternal _SegmentIndexInfo_default_instance_; -class SegmentMeta; -class SegmentMetaDefaultTypeInternal; -extern SegmentMetaDefaultTypeInternal _SegmentMeta_default_instance_; class TenantMeta; class TenantMetaDefaultTypeInternal; extern TenantMetaDefaultTypeInternal _TenantMeta_default_instance_; @@ -98,14 +86,10 @@ extern TenantMetaDefaultTypeInternal _TenantMeta_default_instance_; PROTOBUF_NAMESPACE_OPEN template<> ::milvus::proto::etcd::CollectionInfo* Arena::CreateMaybeMessage<::milvus::proto::etcd::CollectionInfo>(Arena*); template<> ::milvus::proto::etcd::CollectionMeta* Arena::CreateMaybeMessage<::milvus::proto::etcd::CollectionMeta>(Arena*); -template<> ::milvus::proto::etcd::FieldBinlogFiles* Arena::CreateMaybeMessage<::milvus::proto::etcd::FieldBinlogFiles>(Arena*); template<> ::milvus::proto::etcd::FieldIndexInfo* Arena::CreateMaybeMessage<::milvus::proto::etcd::FieldIndexInfo>(Arena*); -template<> ::milvus::proto::etcd::FieldIndexMeta* Arena::CreateMaybeMessage<::milvus::proto::etcd::FieldIndexMeta>(Arena*); template<> ::milvus::proto::etcd::IndexInfo* Arena::CreateMaybeMessage<::milvus::proto::etcd::IndexInfo>(Arena*); -template<> ::milvus::proto::etcd::PartitionInfo* Arena::CreateMaybeMessage<::milvus::proto::etcd::PartitionInfo>(Arena*); template<> ::milvus::proto::etcd::ProxyMeta* Arena::CreateMaybeMessage<::milvus::proto::etcd::ProxyMeta>(Arena*); template<> ::milvus::proto::etcd::SegmentIndexInfo* Arena::CreateMaybeMessage<::milvus::proto::etcd::SegmentIndexInfo>(Arena*); -template<> ::milvus::proto::etcd::SegmentMeta* Arena::CreateMaybeMessage<::milvus::proto::etcd::SegmentMeta>(Arena*); template<> ::milvus::proto::etcd::TenantMeta* Arena::CreateMaybeMessage<::milvus::proto::etcd::TenantMeta>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace milvus { @@ -444,164 +428,6 @@ class ProxyMeta : }; // ------------------------------------------------------------------- -class PartitionInfo : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.etcd.PartitionInfo) */ { - public: - PartitionInfo(); - virtual ~PartitionInfo(); - - PartitionInfo(const PartitionInfo& from); - PartitionInfo(PartitionInfo&& from) noexcept - : PartitionInfo() { - *this = ::std::move(from); - } - - inline PartitionInfo& operator=(const PartitionInfo& from) { - CopyFrom(from); - return *this; - } - inline PartitionInfo& operator=(PartitionInfo&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const PartitionInfo& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const PartitionInfo* internal_default_instance() { - return reinterpret_cast( - &_PartitionInfo_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(PartitionInfo& a, PartitionInfo& b) { - a.Swap(&b); - } - inline void Swap(PartitionInfo* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline PartitionInfo* New() const final { - return CreateMaybeMessage(nullptr); - } - - PartitionInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const PartitionInfo& from); - void MergeFrom(const PartitionInfo& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(PartitionInfo* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "milvus.proto.etcd.PartitionInfo"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_etcd_5fmeta_2eproto); - return ::descriptor_table_etcd_5fmeta_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kSegmentIDsFieldNumber = 3, - kPartitionNameFieldNumber = 1, - kPartitionIDFieldNumber = 2, - }; - // repeated int64 segmentIDs = 3; - int segmentids_size() const; - void clear_segmentids(); - ::PROTOBUF_NAMESPACE_ID::int64 segmentids(int index) const; - void set_segmentids(int index, ::PROTOBUF_NAMESPACE_ID::int64 value); - void add_segmentids(::PROTOBUF_NAMESPACE_ID::int64 value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& - segmentids() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* - mutable_segmentids(); - - // string partition_name = 1; - void clear_partition_name(); - const std::string& partition_name() const; - void set_partition_name(const std::string& value); - void set_partition_name(std::string&& value); - void set_partition_name(const char* value); - void set_partition_name(const char* value, size_t size); - std::string* mutable_partition_name(); - std::string* release_partition_name(); - void set_allocated_partition_name(std::string* partition_name); - - // int64 partitionID = 2; - void clear_partitionid(); - ::PROTOBUF_NAMESPACE_ID::int64 partitionid() const; - void set_partitionid(::PROTOBUF_NAMESPACE_ID::int64 value); - - // @@protoc_insertion_point(class_scope:milvus.proto.etcd.PartitionInfo) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > segmentids_; - mutable std::atomic _segmentids_cached_byte_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partition_name_; - ::PROTOBUF_NAMESPACE_ID::int64 partitionid_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_etcd_5fmeta_2eproto; -}; -// ------------------------------------------------------------------- - class IndexInfo : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.etcd.IndexInfo) */ { public: @@ -644,7 +470,7 @@ class IndexInfo : &_IndexInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 2; friend void swap(IndexInfo& a, IndexInfo& b) { a.Swap(&b); @@ -801,7 +627,7 @@ class FieldIndexInfo : &_FieldIndexInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 3; friend void swap(FieldIndexInfo& a, FieldIndexInfo& b) { a.Swap(&b); @@ -939,7 +765,7 @@ class CollectionInfo : &_CollectionInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 4; friend void swap(CollectionInfo& a, CollectionInfo& b) { a.Swap(&b); @@ -1011,9 +837,10 @@ class CollectionInfo : enum : int { kPartitionIDsFieldNumber = 4, - kFieldIndexesFieldNumber = 5, - kVirtualChannelNamesFieldNumber = 6, - kPhysicalChannelNamesFieldNumber = 7, + kPartitonNamesFieldNumber = 5, + kFieldIndexesFieldNumber = 6, + kVirtualChannelNamesFieldNumber = 7, + kPhysicalChannelNamesFieldNumber = 8, kSchemaFieldNumber = 2, kIDFieldNumber = 1, kCreateTimeFieldNumber = 3, @@ -1029,7 +856,24 @@ class CollectionInfo : ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* mutable_partitionids(); - // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 5; + // repeated string partitonNames = 5; + int partitonnames_size() const; + void clear_partitonnames(); + const std::string& partitonnames(int index) const; + std::string* mutable_partitonnames(int index); + void set_partitonnames(int index, const std::string& value); + void set_partitonnames(int index, std::string&& value); + void set_partitonnames(int index, const char* value); + void set_partitonnames(int index, const char* value, size_t size); + std::string* add_partitonnames(); + void add_partitonnames(const std::string& value); + void add_partitonnames(std::string&& value); + void add_partitonnames(const char* value); + void add_partitonnames(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& partitonnames() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_partitonnames(); + + // repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 6; int field_indexes_size() const; void clear_field_indexes(); ::milvus::proto::etcd::FieldIndexInfo* mutable_field_indexes(int index); @@ -1040,7 +884,7 @@ class CollectionInfo : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::etcd::FieldIndexInfo >& field_indexes() const; - // repeated string virtual_channel_names = 6; + // repeated string virtual_channel_names = 7; int virtual_channel_names_size() const; void clear_virtual_channel_names(); const std::string& virtual_channel_names(int index) const; @@ -1057,7 +901,7 @@ class CollectionInfo : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& virtual_channel_names() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_virtual_channel_names(); - // repeated string physical_channel_names = 7; + // repeated string physical_channel_names = 8; int physical_channel_names_size() const; void clear_physical_channel_names(); const std::string& physical_channel_names(int index) const; @@ -1099,6 +943,7 @@ class CollectionInfo : ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > partitionids_; mutable std::atomic _partitionids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField partitonnames_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::etcd::FieldIndexInfo > field_indexes_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField virtual_channel_names_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField physical_channel_names_; @@ -1152,7 +997,7 @@ class SegmentIndexInfo : &_SegmentIndexInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 5; friend void swap(SegmentIndexInfo& a, SegmentIndexInfo& b) { a.Swap(&b); @@ -1311,7 +1156,7 @@ class CollectionMeta : &_CollectionMeta_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 6; friend void swap(CollectionMeta& a, CollectionMeta& b) { a.Swap(&b); @@ -1462,546 +1307,6 @@ class CollectionMeta : mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_etcd_5fmeta_2eproto; }; -// ------------------------------------------------------------------- - -class FieldBinlogFiles : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.etcd.FieldBinlogFiles) */ { - public: - FieldBinlogFiles(); - virtual ~FieldBinlogFiles(); - - FieldBinlogFiles(const FieldBinlogFiles& from); - FieldBinlogFiles(FieldBinlogFiles&& from) noexcept - : FieldBinlogFiles() { - *this = ::std::move(from); - } - - inline FieldBinlogFiles& operator=(const FieldBinlogFiles& from) { - CopyFrom(from); - return *this; - } - inline FieldBinlogFiles& operator=(FieldBinlogFiles&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const FieldBinlogFiles& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const FieldBinlogFiles* internal_default_instance() { - return reinterpret_cast( - &_FieldBinlogFiles_default_instance_); - } - static constexpr int kIndexInFileMessages = - 8; - - friend void swap(FieldBinlogFiles& a, FieldBinlogFiles& b) { - a.Swap(&b); - } - inline void Swap(FieldBinlogFiles* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline FieldBinlogFiles* New() const final { - return CreateMaybeMessage(nullptr); - } - - FieldBinlogFiles* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const FieldBinlogFiles& from); - void MergeFrom(const FieldBinlogFiles& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(FieldBinlogFiles* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "milvus.proto.etcd.FieldBinlogFiles"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_etcd_5fmeta_2eproto); - return ::descriptor_table_etcd_5fmeta_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kBinlogFilesFieldNumber = 2, - kFieldIDFieldNumber = 1, - }; - // repeated string binlog_files = 2; - int binlog_files_size() const; - void clear_binlog_files(); - const std::string& binlog_files(int index) const; - std::string* mutable_binlog_files(int index); - void set_binlog_files(int index, const std::string& value); - void set_binlog_files(int index, std::string&& value); - void set_binlog_files(int index, const char* value); - void set_binlog_files(int index, const char* value, size_t size); - std::string* add_binlog_files(); - void add_binlog_files(const std::string& value); - void add_binlog_files(std::string&& value); - void add_binlog_files(const char* value); - void add_binlog_files(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& binlog_files() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_binlog_files(); - - // int64 fieldID = 1; - void clear_fieldid(); - ::PROTOBUF_NAMESPACE_ID::int64 fieldid() const; - void set_fieldid(::PROTOBUF_NAMESPACE_ID::int64 value); - - // @@protoc_insertion_point(class_scope:milvus.proto.etcd.FieldBinlogFiles) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField binlog_files_; - ::PROTOBUF_NAMESPACE_ID::int64 fieldid_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_etcd_5fmeta_2eproto; -}; -// ------------------------------------------------------------------- - -class SegmentMeta : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.etcd.SegmentMeta) */ { - public: - SegmentMeta(); - virtual ~SegmentMeta(); - - SegmentMeta(const SegmentMeta& from); - SegmentMeta(SegmentMeta&& from) noexcept - : SegmentMeta() { - *this = ::std::move(from); - } - - inline SegmentMeta& operator=(const SegmentMeta& from) { - CopyFrom(from); - return *this; - } - inline SegmentMeta& operator=(SegmentMeta&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const SegmentMeta& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const SegmentMeta* internal_default_instance() { - return reinterpret_cast( - &_SegmentMeta_default_instance_); - } - static constexpr int kIndexInFileMessages = - 9; - - friend void swap(SegmentMeta& a, SegmentMeta& b) { - a.Swap(&b); - } - inline void Swap(SegmentMeta* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline SegmentMeta* New() const final { - return CreateMaybeMessage(nullptr); - } - - SegmentMeta* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const SegmentMeta& from); - void MergeFrom(const SegmentMeta& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SegmentMeta* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "milvus.proto.etcd.SegmentMeta"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_etcd_5fmeta_2eproto); - return ::descriptor_table_etcd_5fmeta_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kBinlogFilePathsFieldNumber = 10, - kPartitionTagFieldNumber = 3, - kSegmentIDFieldNumber = 1, - kCollectionIDFieldNumber = 2, - kChannelStartFieldNumber = 4, - kChannelEndFieldNumber = 5, - kOpenTimeFieldNumber = 6, - kCloseTimeFieldNumber = 7, - kNumRowsFieldNumber = 8, - kMemSizeFieldNumber = 9, - }; - // repeated .milvus.proto.etcd.FieldBinlogFiles binlog_file_paths = 10; - int binlog_file_paths_size() const; - void clear_binlog_file_paths(); - ::milvus::proto::etcd::FieldBinlogFiles* mutable_binlog_file_paths(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::etcd::FieldBinlogFiles >* - mutable_binlog_file_paths(); - const ::milvus::proto::etcd::FieldBinlogFiles& binlog_file_paths(int index) const; - ::milvus::proto::etcd::FieldBinlogFiles* add_binlog_file_paths(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::etcd::FieldBinlogFiles >& - binlog_file_paths() const; - - // string partition_tag = 3; - void clear_partition_tag(); - const std::string& partition_tag() const; - void set_partition_tag(const std::string& value); - void set_partition_tag(std::string&& value); - void set_partition_tag(const char* value); - void set_partition_tag(const char* value, size_t size); - std::string* mutable_partition_tag(); - std::string* release_partition_tag(); - void set_allocated_partition_tag(std::string* partition_tag); - - // int64 segmentID = 1; - void clear_segmentid(); - ::PROTOBUF_NAMESPACE_ID::int64 segmentid() const; - void set_segmentid(::PROTOBUF_NAMESPACE_ID::int64 value); - - // int64 collectionID = 2; - void clear_collectionid(); - ::PROTOBUF_NAMESPACE_ID::int64 collectionid() const; - void set_collectionid(::PROTOBUF_NAMESPACE_ID::int64 value); - - // int32 channel_start = 4; - void clear_channel_start(); - ::PROTOBUF_NAMESPACE_ID::int32 channel_start() const; - void set_channel_start(::PROTOBUF_NAMESPACE_ID::int32 value); - - // int32 channel_end = 5; - void clear_channel_end(); - ::PROTOBUF_NAMESPACE_ID::int32 channel_end() const; - void set_channel_end(::PROTOBUF_NAMESPACE_ID::int32 value); - - // uint64 open_time = 6; - void clear_open_time(); - ::PROTOBUF_NAMESPACE_ID::uint64 open_time() const; - void set_open_time(::PROTOBUF_NAMESPACE_ID::uint64 value); - - // uint64 close_time = 7; - void clear_close_time(); - ::PROTOBUF_NAMESPACE_ID::uint64 close_time() const; - void set_close_time(::PROTOBUF_NAMESPACE_ID::uint64 value); - - // int64 num_rows = 8; - void clear_num_rows(); - ::PROTOBUF_NAMESPACE_ID::int64 num_rows() const; - void set_num_rows(::PROTOBUF_NAMESPACE_ID::int64 value); - - // int64 mem_size = 9; - void clear_mem_size(); - ::PROTOBUF_NAMESPACE_ID::int64 mem_size() const; - void set_mem_size(::PROTOBUF_NAMESPACE_ID::int64 value); - - // @@protoc_insertion_point(class_scope:milvus.proto.etcd.SegmentMeta) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::etcd::FieldBinlogFiles > binlog_file_paths_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partition_tag_; - ::PROTOBUF_NAMESPACE_ID::int64 segmentid_; - ::PROTOBUF_NAMESPACE_ID::int64 collectionid_; - ::PROTOBUF_NAMESPACE_ID::int32 channel_start_; - ::PROTOBUF_NAMESPACE_ID::int32 channel_end_; - ::PROTOBUF_NAMESPACE_ID::uint64 open_time_; - ::PROTOBUF_NAMESPACE_ID::uint64 close_time_; - ::PROTOBUF_NAMESPACE_ID::int64 num_rows_; - ::PROTOBUF_NAMESPACE_ID::int64 mem_size_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_etcd_5fmeta_2eproto; -}; -// ------------------------------------------------------------------- - -class FieldIndexMeta : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.etcd.FieldIndexMeta) */ { - public: - FieldIndexMeta(); - virtual ~FieldIndexMeta(); - - FieldIndexMeta(const FieldIndexMeta& from); - FieldIndexMeta(FieldIndexMeta&& from) noexcept - : FieldIndexMeta() { - *this = ::std::move(from); - } - - inline FieldIndexMeta& operator=(const FieldIndexMeta& from) { - CopyFrom(from); - return *this; - } - inline FieldIndexMeta& operator=(FieldIndexMeta&& from) noexcept { - if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const FieldIndexMeta& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const FieldIndexMeta* internal_default_instance() { - return reinterpret_cast( - &_FieldIndexMeta_default_instance_); - } - static constexpr int kIndexInFileMessages = - 10; - - friend void swap(FieldIndexMeta& a, FieldIndexMeta& b) { - a.Swap(&b); - } - inline void Swap(FieldIndexMeta* other) { - if (other == this) return; - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline FieldIndexMeta* New() const final { - return CreateMaybeMessage(nullptr); - } - - FieldIndexMeta* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const FieldIndexMeta& from); - void MergeFrom(const FieldIndexMeta& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - #else - bool MergePartialFromCodedStream( - ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; - ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( - ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(FieldIndexMeta* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "milvus.proto.etcd.FieldIndexMeta"; - } - private: - inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { - return nullptr; - } - inline void* MaybeArenaPtr() const { - return nullptr; - } - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_etcd_5fmeta_2eproto); - return ::descriptor_table_etcd_5fmeta_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kIndexParamsFieldNumber = 4, - kIndexFilePathsFieldNumber = 6, - kSegmentIDFieldNumber = 1, - kFieldIDFieldNumber = 2, - kIndexIDFieldNumber = 3, - kStateFieldNumber = 5, - }; - // repeated .milvus.proto.common.KeyValuePair index_params = 4; - int index_params_size() const; - void clear_index_params(); - ::milvus::proto::common::KeyValuePair* mutable_index_params(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::KeyValuePair >* - mutable_index_params(); - const ::milvus::proto::common::KeyValuePair& index_params(int index) const; - ::milvus::proto::common::KeyValuePair* add_index_params(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::KeyValuePair >& - index_params() const; - - // repeated string index_file_paths = 6; - int index_file_paths_size() const; - void clear_index_file_paths(); - const std::string& index_file_paths(int index) const; - std::string* mutable_index_file_paths(int index); - void set_index_file_paths(int index, const std::string& value); - void set_index_file_paths(int index, std::string&& value); - void set_index_file_paths(int index, const char* value); - void set_index_file_paths(int index, const char* value, size_t size); - std::string* add_index_file_paths(); - void add_index_file_paths(const std::string& value); - void add_index_file_paths(std::string&& value); - void add_index_file_paths(const char* value); - void add_index_file_paths(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& index_file_paths() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_index_file_paths(); - - // int64 segmentID = 1; - void clear_segmentid(); - ::PROTOBUF_NAMESPACE_ID::int64 segmentid() const; - void set_segmentid(::PROTOBUF_NAMESPACE_ID::int64 value); - - // int64 fieldID = 2; - void clear_fieldid(); - ::PROTOBUF_NAMESPACE_ID::int64 fieldid() const; - void set_fieldid(::PROTOBUF_NAMESPACE_ID::int64 value); - - // int64 indexID = 3; - void clear_indexid(); - ::PROTOBUF_NAMESPACE_ID::int64 indexid() const; - void set_indexid(::PROTOBUF_NAMESPACE_ID::int64 value); - - // .milvus.proto.common.IndexState state = 5; - void clear_state(); - ::milvus::proto::common::IndexState state() const; - void set_state(::milvus::proto::common::IndexState value); - - // @@protoc_insertion_point(class_scope:milvus.proto.etcd.FieldIndexMeta) - private: - class _Internal; - - ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::KeyValuePair > index_params_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField index_file_paths_; - ::PROTOBUF_NAMESPACE_ID::int64 segmentid_; - ::PROTOBUF_NAMESPACE_ID::int64 fieldid_; - ::PROTOBUF_NAMESPACE_ID::int64 indexid_; - int state_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_etcd_5fmeta_2eproto; -}; // =================================================================== @@ -2287,105 +1592,6 @@ ProxyMeta::mutable_result_channelids() { // ------------------------------------------------------------------- -// PartitionInfo - -// string partition_name = 1; -inline void PartitionInfo::clear_partition_name() { - partition_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline const std::string& PartitionInfo::partition_name() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.PartitionInfo.partition_name) - return partition_name_.GetNoArena(); -} -inline void PartitionInfo::set_partition_name(const std::string& value) { - - partition_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:milvus.proto.etcd.PartitionInfo.partition_name) -} -inline void PartitionInfo::set_partition_name(std::string&& value) { - - partition_name_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:milvus.proto.etcd.PartitionInfo.partition_name) -} -inline void PartitionInfo::set_partition_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - partition_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:milvus.proto.etcd.PartitionInfo.partition_name) -} -inline void PartitionInfo::set_partition_name(const char* value, size_t size) { - - partition_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:milvus.proto.etcd.PartitionInfo.partition_name) -} -inline std::string* PartitionInfo::mutable_partition_name() { - - // @@protoc_insertion_point(field_mutable:milvus.proto.etcd.PartitionInfo.partition_name) - return partition_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline std::string* PartitionInfo::release_partition_name() { - // @@protoc_insertion_point(field_release:milvus.proto.etcd.PartitionInfo.partition_name) - - return partition_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline void PartitionInfo::set_allocated_partition_name(std::string* partition_name) { - if (partition_name != nullptr) { - - } else { - - } - partition_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), partition_name); - // @@protoc_insertion_point(field_set_allocated:milvus.proto.etcd.PartitionInfo.partition_name) -} - -// int64 partitionID = 2; -inline void PartitionInfo::clear_partitionid() { - partitionid_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 PartitionInfo::partitionid() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.PartitionInfo.partitionID) - return partitionid_; -} -inline void PartitionInfo::set_partitionid(::PROTOBUF_NAMESPACE_ID::int64 value) { - - partitionid_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.PartitionInfo.partitionID) -} - -// repeated int64 segmentIDs = 3; -inline int PartitionInfo::segmentids_size() const { - return segmentids_.size(); -} -inline void PartitionInfo::clear_segmentids() { - segmentids_.Clear(); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 PartitionInfo::segmentids(int index) const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.PartitionInfo.segmentIDs) - return segmentids_.Get(index); -} -inline void PartitionInfo::set_segmentids(int index, ::PROTOBUF_NAMESPACE_ID::int64 value) { - segmentids_.Set(index, value); - // @@protoc_insertion_point(field_set:milvus.proto.etcd.PartitionInfo.segmentIDs) -} -inline void PartitionInfo::add_segmentids(::PROTOBUF_NAMESPACE_ID::int64 value) { - segmentids_.Add(value); - // @@protoc_insertion_point(field_add:milvus.proto.etcd.PartitionInfo.segmentIDs) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& -PartitionInfo::segmentids() const { - // @@protoc_insertion_point(field_list:milvus.proto.etcd.PartitionInfo.segmentIDs) - return segmentids_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* -PartitionInfo::mutable_segmentids() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.etcd.PartitionInfo.segmentIDs) - return &segmentids_; -} - -// ------------------------------------------------------------------- - // IndexInfo // string index_name = 1; @@ -2619,7 +1825,72 @@ CollectionInfo::mutable_partitionids() { return &partitionids_; } -// repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 5; +// repeated string partitonNames = 5; +inline int CollectionInfo::partitonnames_size() const { + return partitonnames_.size(); +} +inline void CollectionInfo::clear_partitonnames() { + partitonnames_.Clear(); +} +inline const std::string& CollectionInfo::partitonnames(int index) const { + // @@protoc_insertion_point(field_get:milvus.proto.etcd.CollectionInfo.partitonNames) + return partitonnames_.Get(index); +} +inline std::string* CollectionInfo::mutable_partitonnames(int index) { + // @@protoc_insertion_point(field_mutable:milvus.proto.etcd.CollectionInfo.partitonNames) + return partitonnames_.Mutable(index); +} +inline void CollectionInfo::set_partitonnames(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:milvus.proto.etcd.CollectionInfo.partitonNames) + partitonnames_.Mutable(index)->assign(value); +} +inline void CollectionInfo::set_partitonnames(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:milvus.proto.etcd.CollectionInfo.partitonNames) + partitonnames_.Mutable(index)->assign(std::move(value)); +} +inline void CollectionInfo::set_partitonnames(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + partitonnames_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:milvus.proto.etcd.CollectionInfo.partitonNames) +} +inline void CollectionInfo::set_partitonnames(int index, const char* value, size_t size) { + partitonnames_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.etcd.CollectionInfo.partitonNames) +} +inline std::string* CollectionInfo::add_partitonnames() { + // @@protoc_insertion_point(field_add_mutable:milvus.proto.etcd.CollectionInfo.partitonNames) + return partitonnames_.Add(); +} +inline void CollectionInfo::add_partitonnames(const std::string& value) { + partitonnames_.Add()->assign(value); + // @@protoc_insertion_point(field_add:milvus.proto.etcd.CollectionInfo.partitonNames) +} +inline void CollectionInfo::add_partitonnames(std::string&& value) { + partitonnames_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:milvus.proto.etcd.CollectionInfo.partitonNames) +} +inline void CollectionInfo::add_partitonnames(const char* value) { + GOOGLE_DCHECK(value != nullptr); + partitonnames_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:milvus.proto.etcd.CollectionInfo.partitonNames) +} +inline void CollectionInfo::add_partitonnames(const char* value, size_t size) { + partitonnames_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:milvus.proto.etcd.CollectionInfo.partitonNames) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +CollectionInfo::partitonnames() const { + // @@protoc_insertion_point(field_list:milvus.proto.etcd.CollectionInfo.partitonNames) + return partitonnames_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +CollectionInfo::mutable_partitonnames() { + // @@protoc_insertion_point(field_mutable_list:milvus.proto.etcd.CollectionInfo.partitonNames) + return &partitonnames_; +} + +// repeated .milvus.proto.etcd.FieldIndexInfo field_indexes = 6; inline int CollectionInfo::field_indexes_size() const { return field_indexes_.size(); } @@ -2649,7 +1920,7 @@ CollectionInfo::field_indexes() const { return field_indexes_; } -// repeated string virtual_channel_names = 6; +// repeated string virtual_channel_names = 7; inline int CollectionInfo::virtual_channel_names_size() const { return virtual_channel_names_.size(); } @@ -2714,7 +1985,7 @@ CollectionInfo::mutable_virtual_channel_names() { return &virtual_channel_names_; } -// repeated string physical_channel_names = 7; +// repeated string physical_channel_names = 8; inline int CollectionInfo::physical_channel_names_size() const { return physical_channel_names_.size(); } @@ -3055,438 +2326,6 @@ CollectionMeta::mutable_partitionids() { return &partitionids_; } -// ------------------------------------------------------------------- - -// FieldBinlogFiles - -// int64 fieldID = 1; -inline void FieldBinlogFiles::clear_fieldid() { - fieldid_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 FieldBinlogFiles::fieldid() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldBinlogFiles.fieldID) - return fieldid_; -} -inline void FieldBinlogFiles::set_fieldid(::PROTOBUF_NAMESPACE_ID::int64 value) { - - fieldid_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldBinlogFiles.fieldID) -} - -// repeated string binlog_files = 2; -inline int FieldBinlogFiles::binlog_files_size() const { - return binlog_files_.size(); -} -inline void FieldBinlogFiles::clear_binlog_files() { - binlog_files_.Clear(); -} -inline const std::string& FieldBinlogFiles::binlog_files(int index) const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldBinlogFiles.binlog_files) - return binlog_files_.Get(index); -} -inline std::string* FieldBinlogFiles::mutable_binlog_files(int index) { - // @@protoc_insertion_point(field_mutable:milvus.proto.etcd.FieldBinlogFiles.binlog_files) - return binlog_files_.Mutable(index); -} -inline void FieldBinlogFiles::set_binlog_files(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldBinlogFiles.binlog_files) - binlog_files_.Mutable(index)->assign(value); -} -inline void FieldBinlogFiles::set_binlog_files(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldBinlogFiles.binlog_files) - binlog_files_.Mutable(index)->assign(std::move(value)); -} -inline void FieldBinlogFiles::set_binlog_files(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - binlog_files_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:milvus.proto.etcd.FieldBinlogFiles.binlog_files) -} -inline void FieldBinlogFiles::set_binlog_files(int index, const char* value, size_t size) { - binlog_files_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:milvus.proto.etcd.FieldBinlogFiles.binlog_files) -} -inline std::string* FieldBinlogFiles::add_binlog_files() { - // @@protoc_insertion_point(field_add_mutable:milvus.proto.etcd.FieldBinlogFiles.binlog_files) - return binlog_files_.Add(); -} -inline void FieldBinlogFiles::add_binlog_files(const std::string& value) { - binlog_files_.Add()->assign(value); - // @@protoc_insertion_point(field_add:milvus.proto.etcd.FieldBinlogFiles.binlog_files) -} -inline void FieldBinlogFiles::add_binlog_files(std::string&& value) { - binlog_files_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:milvus.proto.etcd.FieldBinlogFiles.binlog_files) -} -inline void FieldBinlogFiles::add_binlog_files(const char* value) { - GOOGLE_DCHECK(value != nullptr); - binlog_files_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:milvus.proto.etcd.FieldBinlogFiles.binlog_files) -} -inline void FieldBinlogFiles::add_binlog_files(const char* value, size_t size) { - binlog_files_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:milvus.proto.etcd.FieldBinlogFiles.binlog_files) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -FieldBinlogFiles::binlog_files() const { - // @@protoc_insertion_point(field_list:milvus.proto.etcd.FieldBinlogFiles.binlog_files) - return binlog_files_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -FieldBinlogFiles::mutable_binlog_files() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.etcd.FieldBinlogFiles.binlog_files) - return &binlog_files_; -} - -// ------------------------------------------------------------------- - -// SegmentMeta - -// int64 segmentID = 1; -inline void SegmentMeta::clear_segmentid() { - segmentid_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 SegmentMeta::segmentid() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.segmentID) - return segmentid_; -} -inline void SegmentMeta::set_segmentid(::PROTOBUF_NAMESPACE_ID::int64 value) { - - segmentid_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.segmentID) -} - -// int64 collectionID = 2; -inline void SegmentMeta::clear_collectionid() { - collectionid_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 SegmentMeta::collectionid() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.collectionID) - return collectionid_; -} -inline void SegmentMeta::set_collectionid(::PROTOBUF_NAMESPACE_ID::int64 value) { - - collectionid_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.collectionID) -} - -// string partition_tag = 3; -inline void SegmentMeta::clear_partition_tag() { - partition_tag_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline const std::string& SegmentMeta::partition_tag() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.partition_tag) - return partition_tag_.GetNoArena(); -} -inline void SegmentMeta::set_partition_tag(const std::string& value) { - - partition_tag_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.partition_tag) -} -inline void SegmentMeta::set_partition_tag(std::string&& value) { - - partition_tag_.SetNoArena( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:milvus.proto.etcd.SegmentMeta.partition_tag) -} -inline void SegmentMeta::set_partition_tag(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - partition_tag_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:milvus.proto.etcd.SegmentMeta.partition_tag) -} -inline void SegmentMeta::set_partition_tag(const char* value, size_t size) { - - partition_tag_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:milvus.proto.etcd.SegmentMeta.partition_tag) -} -inline std::string* SegmentMeta::mutable_partition_tag() { - - // @@protoc_insertion_point(field_mutable:milvus.proto.etcd.SegmentMeta.partition_tag) - return partition_tag_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline std::string* SegmentMeta::release_partition_tag() { - // @@protoc_insertion_point(field_release:milvus.proto.etcd.SegmentMeta.partition_tag) - - return partition_tag_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} -inline void SegmentMeta::set_allocated_partition_tag(std::string* partition_tag) { - if (partition_tag != nullptr) { - - } else { - - } - partition_tag_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), partition_tag); - // @@protoc_insertion_point(field_set_allocated:milvus.proto.etcd.SegmentMeta.partition_tag) -} - -// int32 channel_start = 4; -inline void SegmentMeta::clear_channel_start() { - channel_start_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 SegmentMeta::channel_start() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.channel_start) - return channel_start_; -} -inline void SegmentMeta::set_channel_start(::PROTOBUF_NAMESPACE_ID::int32 value) { - - channel_start_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.channel_start) -} - -// int32 channel_end = 5; -inline void SegmentMeta::clear_channel_end() { - channel_end_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 SegmentMeta::channel_end() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.channel_end) - return channel_end_; -} -inline void SegmentMeta::set_channel_end(::PROTOBUF_NAMESPACE_ID::int32 value) { - - channel_end_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.channel_end) -} - -// uint64 open_time = 6; -inline void SegmentMeta::clear_open_time() { - open_time_ = PROTOBUF_ULONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::uint64 SegmentMeta::open_time() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.open_time) - return open_time_; -} -inline void SegmentMeta::set_open_time(::PROTOBUF_NAMESPACE_ID::uint64 value) { - - open_time_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.open_time) -} - -// uint64 close_time = 7; -inline void SegmentMeta::clear_close_time() { - close_time_ = PROTOBUF_ULONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::uint64 SegmentMeta::close_time() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.close_time) - return close_time_; -} -inline void SegmentMeta::set_close_time(::PROTOBUF_NAMESPACE_ID::uint64 value) { - - close_time_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.close_time) -} - -// int64 num_rows = 8; -inline void SegmentMeta::clear_num_rows() { - num_rows_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 SegmentMeta::num_rows() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.num_rows) - return num_rows_; -} -inline void SegmentMeta::set_num_rows(::PROTOBUF_NAMESPACE_ID::int64 value) { - - num_rows_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.num_rows) -} - -// int64 mem_size = 9; -inline void SegmentMeta::clear_mem_size() { - mem_size_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 SegmentMeta::mem_size() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.mem_size) - return mem_size_; -} -inline void SegmentMeta::set_mem_size(::PROTOBUF_NAMESPACE_ID::int64 value) { - - mem_size_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.SegmentMeta.mem_size) -} - -// repeated .milvus.proto.etcd.FieldBinlogFiles binlog_file_paths = 10; -inline int SegmentMeta::binlog_file_paths_size() const { - return binlog_file_paths_.size(); -} -inline void SegmentMeta::clear_binlog_file_paths() { - binlog_file_paths_.Clear(); -} -inline ::milvus::proto::etcd::FieldBinlogFiles* SegmentMeta::mutable_binlog_file_paths(int index) { - // @@protoc_insertion_point(field_mutable:milvus.proto.etcd.SegmentMeta.binlog_file_paths) - return binlog_file_paths_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::etcd::FieldBinlogFiles >* -SegmentMeta::mutable_binlog_file_paths() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.etcd.SegmentMeta.binlog_file_paths) - return &binlog_file_paths_; -} -inline const ::milvus::proto::etcd::FieldBinlogFiles& SegmentMeta::binlog_file_paths(int index) const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.SegmentMeta.binlog_file_paths) - return binlog_file_paths_.Get(index); -} -inline ::milvus::proto::etcd::FieldBinlogFiles* SegmentMeta::add_binlog_file_paths() { - // @@protoc_insertion_point(field_add:milvus.proto.etcd.SegmentMeta.binlog_file_paths) - return binlog_file_paths_.Add(); -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::etcd::FieldBinlogFiles >& -SegmentMeta::binlog_file_paths() const { - // @@protoc_insertion_point(field_list:milvus.proto.etcd.SegmentMeta.binlog_file_paths) - return binlog_file_paths_; -} - -// ------------------------------------------------------------------- - -// FieldIndexMeta - -// int64 segmentID = 1; -inline void FieldIndexMeta::clear_segmentid() { - segmentid_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 FieldIndexMeta::segmentid() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.segmentID) - return segmentid_; -} -inline void FieldIndexMeta::set_segmentid(::PROTOBUF_NAMESPACE_ID::int64 value) { - - segmentid_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.segmentID) -} - -// int64 fieldID = 2; -inline void FieldIndexMeta::clear_fieldid() { - fieldid_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 FieldIndexMeta::fieldid() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.fieldID) - return fieldid_; -} -inline void FieldIndexMeta::set_fieldid(::PROTOBUF_NAMESPACE_ID::int64 value) { - - fieldid_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.fieldID) -} - -// int64 indexID = 3; -inline void FieldIndexMeta::clear_indexid() { - indexid_ = PROTOBUF_LONGLONG(0); -} -inline ::PROTOBUF_NAMESPACE_ID::int64 FieldIndexMeta::indexid() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.indexID) - return indexid_; -} -inline void FieldIndexMeta::set_indexid(::PROTOBUF_NAMESPACE_ID::int64 value) { - - indexid_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.indexID) -} - -// repeated .milvus.proto.common.KeyValuePair index_params = 4; -inline int FieldIndexMeta::index_params_size() const { - return index_params_.size(); -} -inline ::milvus::proto::common::KeyValuePair* FieldIndexMeta::mutable_index_params(int index) { - // @@protoc_insertion_point(field_mutable:milvus.proto.etcd.FieldIndexMeta.index_params) - return index_params_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::KeyValuePair >* -FieldIndexMeta::mutable_index_params() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.etcd.FieldIndexMeta.index_params) - return &index_params_; -} -inline const ::milvus::proto::common::KeyValuePair& FieldIndexMeta::index_params(int index) const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.index_params) - return index_params_.Get(index); -} -inline ::milvus::proto::common::KeyValuePair* FieldIndexMeta::add_index_params() { - // @@protoc_insertion_point(field_add:milvus.proto.etcd.FieldIndexMeta.index_params) - return index_params_.Add(); -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::KeyValuePair >& -FieldIndexMeta::index_params() const { - // @@protoc_insertion_point(field_list:milvus.proto.etcd.FieldIndexMeta.index_params) - return index_params_; -} - -// .milvus.proto.common.IndexState state = 5; -inline void FieldIndexMeta::clear_state() { - state_ = 0; -} -inline ::milvus::proto::common::IndexState FieldIndexMeta::state() const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.state) - return static_cast< ::milvus::proto::common::IndexState >(state_); -} -inline void FieldIndexMeta::set_state(::milvus::proto::common::IndexState value) { - - state_ = value; - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.state) -} - -// repeated string index_file_paths = 6; -inline int FieldIndexMeta::index_file_paths_size() const { - return index_file_paths_.size(); -} -inline void FieldIndexMeta::clear_index_file_paths() { - index_file_paths_.Clear(); -} -inline const std::string& FieldIndexMeta::index_file_paths(int index) const { - // @@protoc_insertion_point(field_get:milvus.proto.etcd.FieldIndexMeta.index_file_paths) - return index_file_paths_.Get(index); -} -inline std::string* FieldIndexMeta::mutable_index_file_paths(int index) { - // @@protoc_insertion_point(field_mutable:milvus.proto.etcd.FieldIndexMeta.index_file_paths) - return index_file_paths_.Mutable(index); -} -inline void FieldIndexMeta::set_index_file_paths(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.index_file_paths) - index_file_paths_.Mutable(index)->assign(value); -} -inline void FieldIndexMeta::set_index_file_paths(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:milvus.proto.etcd.FieldIndexMeta.index_file_paths) - index_file_paths_.Mutable(index)->assign(std::move(value)); -} -inline void FieldIndexMeta::set_index_file_paths(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - index_file_paths_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:milvus.proto.etcd.FieldIndexMeta.index_file_paths) -} -inline void FieldIndexMeta::set_index_file_paths(int index, const char* value, size_t size) { - index_file_paths_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:milvus.proto.etcd.FieldIndexMeta.index_file_paths) -} -inline std::string* FieldIndexMeta::add_index_file_paths() { - // @@protoc_insertion_point(field_add_mutable:milvus.proto.etcd.FieldIndexMeta.index_file_paths) - return index_file_paths_.Add(); -} -inline void FieldIndexMeta::add_index_file_paths(const std::string& value) { - index_file_paths_.Add()->assign(value); - // @@protoc_insertion_point(field_add:milvus.proto.etcd.FieldIndexMeta.index_file_paths) -} -inline void FieldIndexMeta::add_index_file_paths(std::string&& value) { - index_file_paths_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:milvus.proto.etcd.FieldIndexMeta.index_file_paths) -} -inline void FieldIndexMeta::add_index_file_paths(const char* value) { - GOOGLE_DCHECK(value != nullptr); - index_file_paths_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:milvus.proto.etcd.FieldIndexMeta.index_file_paths) -} -inline void FieldIndexMeta::add_index_file_paths(const char* value, size_t size) { - index_file_paths_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:milvus.proto.etcd.FieldIndexMeta.index_file_paths) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -FieldIndexMeta::index_file_paths() const { - // @@protoc_insertion_point(field_list:milvus.proto.etcd.FieldIndexMeta.index_file_paths) - return index_file_paths_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -FieldIndexMeta::mutable_index_file_paths() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.etcd.FieldIndexMeta.index_file_paths) - return &index_file_paths_; -} - #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -3502,14 +2341,6 @@ FieldIndexMeta::mutable_index_file_paths() { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) diff --git a/internal/distributed/rootcoord/client/client.go b/internal/distributed/rootcoord/client/client.go index 3bc5f83e00..7e8759d7d5 100644 --- a/internal/distributed/rootcoord/client/client.go +++ b/internal/distributed/rootcoord/client/client.go @@ -321,9 +321,3 @@ func (c *GrpcClient) SegmentFlushCompleted(ctx context.Context, in *datapb.Segme }) return ret.(*commonpb.Status), err } -func (c *GrpcClient) AddNewSegment(ctx context.Context, in *datapb.SegmentMsg) (*commonpb.Status, error) { - ret, err := c.recall(func() (interface{}, error) { - return c.grpcClient.AddNewSegment(ctx, in) - }) - return ret.(*commonpb.Status), err -} diff --git a/internal/distributed/rootcoord/service.go b/internal/distributed/rootcoord/service.go index 3e11243fce..1c91b7b841 100644 --- a/internal/distributed/rootcoord/service.go +++ b/internal/distributed/rootcoord/service.go @@ -353,6 +353,3 @@ func (s *Server) ReleaseDQLMessageStream(ctx context.Context, in *proxypb.Releas func (s *Server) SegmentFlushCompleted(ctx context.Context, in *datapb.SegmentFlushCompletedMsg) (*commonpb.Status, error) { return s.rootCoord.SegmentFlushCompleted(ctx, in) } -func (s *Server) AddNewSegment(ctx context.Context, in *datapb.SegmentMsg) (*commonpb.Status, error) { - return s.rootCoord.AddNewSegment(ctx, in) -} diff --git a/internal/distributed/rootcoord/service_test.go b/internal/distributed/rootcoord/service_test.go index 59a7607985..6cdcbd674e 100644 --- a/internal/distributed/rootcoord/service_test.go +++ b/internal/distributed/rootcoord/service_test.go @@ -130,7 +130,6 @@ func TestGrpcService(t *testing.T) { rootcoord.Params.MsgChannelSubName = fmt.Sprintf("msgChannel%d", randVal) rootcoord.Params.TimeTickChannel = fmt.Sprintf("timeTick%d", randVal) rootcoord.Params.StatisticsChannel = fmt.Sprintf("stateChannel%d", randVal) - rootcoord.Params.DataCoordSegmentChannel = fmt.Sprintf("segmentChannel%d", randVal) rootcoord.Params.MaxPartitionNum = 64 rootcoord.Params.DefaultPartitionName = "_default" @@ -166,11 +165,6 @@ func TestGrpcService(t *testing.T) { err = core.Init() assert.Nil(t, err) - FlushedSegmentChan := make(chan *msgstream.MsgPack, 8) - core.DataNodeFlushedSegmentChan = FlushedSegmentChan - SegmentInfoChan := make(chan *msgstream.MsgPack, 8) - core.DataCoordSegmentChan = SegmentInfoChan - timeTickArray := make([]typeutil.Timestamp, 0, 16) timeTickLock := sync.Mutex{} core.SendTimeTick = func(ts typeutil.Timestamp) error { @@ -214,6 +208,15 @@ func TestGrpcService(t *testing.T) { core.CallGetNumRowsService = func(ctx context.Context, segID typeutil.UniqueID, isFromFlushedChan bool) (int64, error) { return rootcoord.Params.MinSegmentSizeToEnableIndex, nil } + segs := []typeutil.UniqueID{} + segLock := sync.Mutex{} + core.CallGetFlushedSegmentsService = func(ctx context.Context, collID, partID typeutil.UniqueID) ([]typeutil.UniqueID, error) { + segLock.Lock() + defer segLock.Unlock() + ret := []typeutil.UniqueID{} + ret = append(ret, segs...) + return ret, nil + } var binlogLock sync.Mutex binlogPathArray := make([]string, 0, 16) @@ -502,9 +505,9 @@ func TestGrpcService(t *testing.T) { collMeta, err := core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) assert.Equal(t, 2, len(collMeta.PartitionIDs)) - partMeta, err := core.MetaTable.GetPartitionByID(1, collMeta.PartitionIDs[1], 0) + partName2, err := core.MetaTable.GetPartitionNameByID(collMeta.ID, collMeta.PartitionIDs[1], 0) assert.Nil(t, err) - assert.Equal(t, partName, partMeta.PartitionName) + assert.Equal(t, partName, partName2) assert.Equal(t, 1, len(collectionMetaCache)) }) @@ -551,28 +554,12 @@ func TestGrpcService(t *testing.T) { coll, err := core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) partID := coll.PartitionIDs[1] - part, err := core.MetaTable.GetPartitionByID(1, partID, 0) + _, err = core.MetaTable.GetPartitionNameByID(coll.ID, partID, 0) assert.Nil(t, err) - assert.Zero(t, len(part.SegmentIDs)) - seg := &datapb.SegmentInfo{ - ID: 1000, - CollectionID: coll.ID, - PartitionID: part.PartitionID, - } - segInfoMsgPack := GenSegInfoMsgPack(seg) - SegmentInfoChan <- segInfoMsgPack - time.Sleep(time.Millisecond * 100) - part, err = core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Equal(t, 1, len(part.SegmentIDs)) - // send msg twice, partition still contains 1 segment - segInfoMsgPack1 := GenSegInfoMsgPack(seg) - SegmentInfoChan <- segInfoMsgPack1 - time.Sleep(time.Millisecond * 100) - part1, err := core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Equal(t, 1, len(part1.SegmentIDs)) + segLock.Lock() + segs = []typeutil.UniqueID{1000} + segLock.Unlock() req := &milvuspb.ShowSegmentsRequest{ Base: &commonpb.MsgBase{ @@ -674,33 +661,30 @@ func TestGrpcService(t *testing.T) { coll, err := core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) partID := coll.PartitionIDs[1] - part, err := core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Equal(t, 1, len(part.SegmentIDs)) - seg := &datapb.SegmentInfo{ - ID: segID, - CollectionID: coll.ID, - PartitionID: part.PartitionID, - } - segInfoMsgPack := GenSegInfoMsgPack(seg) - SegmentInfoChan <- segInfoMsgPack - time.Sleep(time.Millisecond * 100) - part, err = core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Equal(t, 2, len(part.SegmentIDs)) - flushedSegMsgPack := GenFlushedSegMsgPack(segID) - FlushedSegmentChan <- flushedSegMsgPack - time.Sleep(time.Millisecond * 100) - segIdxInfo, err := core.MetaTable.GetSegmentIndexInfoByID(segID, -1, "") + _, err = core.MetaTable.GetPartitionNameByID(coll.ID, partID, 0) assert.Nil(t, err) - // send msg twice, segIdxInfo should not change - flushedSegMsgPack1 := GenFlushedSegMsgPack(segID) - FlushedSegmentChan <- flushedSegMsgPack1 - time.Sleep(time.Millisecond * 100) - segIdxInfo1, err := core.MetaTable.GetSegmentIndexInfoByID(segID, -1, "") + segLock.Lock() + segs = append(segs, segID) + segLock.Unlock() + + flushReq := &datapb.SegmentFlushCompletedMsg{ + Base: &commonpb.MsgBase{ + MsgType: commonpb.MsgType_SegmentFlushDone, + }, + Segment: &datapb.SegmentInfo{ + ID: segID, + CollectionID: coll.ID, + PartitionID: partID, + }, + } + flushRsp, err := cli.SegmentFlushCompleted(ctx, flushReq) assert.Nil(t, err) - assert.Equal(t, segIdxInfo, segIdxInfo1) + assert.Equal(t, flushRsp.ErrorCode, commonpb.ErrorCode_Success) + + flushRsp, err = cli.SegmentFlushCompleted(ctx, flushReq) + assert.Nil(t, err) + assert.Equal(t, flushRsp.ErrorCode, commonpb.ErrorCode_Success) req := &milvuspb.DescribeIndexRequest{ Base: &commonpb.MsgBase{ @@ -766,9 +750,9 @@ func TestGrpcService(t *testing.T) { collMeta, err := core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) assert.Equal(t, 1, len(collMeta.PartitionIDs)) - partMeta, err := core.MetaTable.GetPartitionByID(1, collMeta.PartitionIDs[0], 0) + partName, err := core.MetaTable.GetPartitionNameByID(collMeta.ID, collMeta.PartitionIDs[0], 0) assert.Nil(t, err) - assert.Equal(t, rootcoord.Params.DefaultPartitionName, partMeta.PartitionName) + assert.Equal(t, rootcoord.Params.DefaultPartitionName, partName) assert.Equal(t, 2, len(collectionMetaCache)) }) diff --git a/internal/proto/etcd_meta.proto b/internal/proto/etcd_meta.proto index 26f8149398..36c4d32266 100644 --- a/internal/proto/etcd_meta.proto +++ b/internal/proto/etcd_meta.proto @@ -18,12 +18,6 @@ message ProxyMeta { repeated string result_channelIDs = 3; } -message PartitionInfo { - string partition_name = 1; - int64 partitionID = 2; - repeated int64 segmentIDs = 3; -} - message IndexInfo { string index_name = 1; int64 indexID = 2; @@ -40,9 +34,10 @@ message CollectionInfo { schema.CollectionSchema schema = 2; uint64 create_time = 3; repeated int64 partitionIDs = 4; - repeated FieldIndexInfo field_indexes = 5; - repeated string virtual_channel_names = 6; - repeated string physical_channel_names = 7; + repeated string partitonNames = 5; + repeated FieldIndexInfo field_indexes = 6; + repeated string virtual_channel_names = 7; + repeated string physical_channel_names = 8; } message SegmentIndexInfo { @@ -61,30 +56,3 @@ message CollectionMeta { repeated string partition_tags=5; repeated int64 partitionIDs=6; } - -message FieldBinlogFiles { - int64 fieldID = 1; - repeated string binlog_files = 2; -} - -message SegmentMeta { - int64 segmentID=1; - int64 collectionID =2; - string partition_tag=3; - int32 channel_start=4; - int32 channel_end=5; - uint64 open_time=6; - uint64 close_time=7; - int64 num_rows=8; - int64 mem_size=9; - repeated FieldBinlogFiles binlog_file_paths = 10; -} - -message FieldIndexMeta { - int64 segmentID = 1; - int64 fieldID = 2; - int64 indexID = 3; - repeated common.KeyValuePair index_params = 4; - common.IndexState state = 5; - repeated string index_file_paths = 6; -} diff --git a/internal/proto/etcdpb/etcd_meta.pb.go b/internal/proto/etcdpb/etcd_meta.pb.go index 08d0b9af8a..390235153c 100644 --- a/internal/proto/etcdpb/etcd_meta.pb.go +++ b/internal/proto/etcdpb/etcd_meta.pb.go @@ -140,61 +140,6 @@ func (m *ProxyMeta) GetResultChannelIDs() []string { return nil } -type PartitionInfo struct { - PartitionName string `protobuf:"bytes,1,opt,name=partition_name,json=partitionName,proto3" json:"partition_name,omitempty"` - PartitionID int64 `protobuf:"varint,2,opt,name=partitionID,proto3" json:"partitionID,omitempty"` - SegmentIDs []int64 `protobuf:"varint,3,rep,packed,name=segmentIDs,proto3" json:"segmentIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PartitionInfo) Reset() { *m = PartitionInfo{} } -func (m *PartitionInfo) String() string { return proto.CompactTextString(m) } -func (*PartitionInfo) ProtoMessage() {} -func (*PartitionInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{2} -} - -func (m *PartitionInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PartitionInfo.Unmarshal(m, b) -} -func (m *PartitionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PartitionInfo.Marshal(b, m, deterministic) -} -func (m *PartitionInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartitionInfo.Merge(m, src) -} -func (m *PartitionInfo) XXX_Size() int { - return xxx_messageInfo_PartitionInfo.Size(m) -} -func (m *PartitionInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PartitionInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PartitionInfo proto.InternalMessageInfo - -func (m *PartitionInfo) GetPartitionName() string { - if m != nil { - return m.PartitionName - } - return "" -} - -func (m *PartitionInfo) GetPartitionID() int64 { - if m != nil { - return m.PartitionID - } - return 0 -} - -func (m *PartitionInfo) GetSegmentIDs() []int64 { - if m != nil { - return m.SegmentIDs - } - return nil -} - type IndexInfo struct { IndexName string `protobuf:"bytes,1,opt,name=index_name,json=indexName,proto3" json:"index_name,omitempty"` IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"` @@ -208,7 +153,7 @@ func (m *IndexInfo) Reset() { *m = IndexInfo{} } func (m *IndexInfo) String() string { return proto.CompactTextString(m) } func (*IndexInfo) ProtoMessage() {} func (*IndexInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{3} + return fileDescriptor_975d306d62b73e88, []int{2} } func (m *IndexInfo) XXX_Unmarshal(b []byte) error { @@ -262,7 +207,7 @@ func (m *FieldIndexInfo) Reset() { *m = FieldIndexInfo{} } func (m *FieldIndexInfo) String() string { return proto.CompactTextString(m) } func (*FieldIndexInfo) ProtoMessage() {} func (*FieldIndexInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{4} + return fileDescriptor_975d306d62b73e88, []int{3} } func (m *FieldIndexInfo) XXX_Unmarshal(b []byte) error { @@ -302,9 +247,10 @@ type CollectionInfo struct { Schema *schemapb.CollectionSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` CreateTime uint64 `protobuf:"varint,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` PartitionIDs []int64 `protobuf:"varint,4,rep,packed,name=partitionIDs,proto3" json:"partitionIDs,omitempty"` - FieldIndexes []*FieldIndexInfo `protobuf:"bytes,5,rep,name=field_indexes,json=fieldIndexes,proto3" json:"field_indexes,omitempty"` - VirtualChannelNames []string `protobuf:"bytes,6,rep,name=virtual_channel_names,json=virtualChannelNames,proto3" json:"virtual_channel_names,omitempty"` - PhysicalChannelNames []string `protobuf:"bytes,7,rep,name=physical_channel_names,json=physicalChannelNames,proto3" json:"physical_channel_names,omitempty"` + PartitonNames []string `protobuf:"bytes,5,rep,name=partitonNames,proto3" json:"partitonNames,omitempty"` + FieldIndexes []*FieldIndexInfo `protobuf:"bytes,6,rep,name=field_indexes,json=fieldIndexes,proto3" json:"field_indexes,omitempty"` + VirtualChannelNames []string `protobuf:"bytes,7,rep,name=virtual_channel_names,json=virtualChannelNames,proto3" json:"virtual_channel_names,omitempty"` + PhysicalChannelNames []string `protobuf:"bytes,8,rep,name=physical_channel_names,json=physicalChannelNames,proto3" json:"physical_channel_names,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -314,7 +260,7 @@ func (m *CollectionInfo) Reset() { *m = CollectionInfo{} } func (m *CollectionInfo) String() string { return proto.CompactTextString(m) } func (*CollectionInfo) ProtoMessage() {} func (*CollectionInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{5} + return fileDescriptor_975d306d62b73e88, []int{4} } func (m *CollectionInfo) XXX_Unmarshal(b []byte) error { @@ -363,6 +309,13 @@ func (m *CollectionInfo) GetPartitionIDs() []int64 { return nil } +func (m *CollectionInfo) GetPartitonNames() []string { + if m != nil { + return m.PartitonNames + } + return nil +} + func (m *CollectionInfo) GetFieldIndexes() []*FieldIndexInfo { if m != nil { return m.FieldIndexes @@ -399,7 +352,7 @@ func (m *SegmentIndexInfo) Reset() { *m = SegmentIndexInfo{} } func (m *SegmentIndexInfo) String() string { return proto.CompactTextString(m) } func (*SegmentIndexInfo) ProtoMessage() {} func (*SegmentIndexInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{6} + return fileDescriptor_975d306d62b73e88, []int{5} } func (m *SegmentIndexInfo) XXX_Unmarshal(b []byte) error { @@ -471,7 +424,7 @@ func (m *CollectionMeta) Reset() { *m = CollectionMeta{} } func (m *CollectionMeta) String() string { return proto.CompactTextString(m) } func (*CollectionMeta) ProtoMessage() {} func (*CollectionMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{7} + return fileDescriptor_975d306d62b73e88, []int{6} } func (m *CollectionMeta) XXX_Unmarshal(b []byte) error { @@ -534,316 +487,59 @@ func (m *CollectionMeta) GetPartitionIDs() []int64 { return nil } -type FieldBinlogFiles struct { - FieldID int64 `protobuf:"varint,1,opt,name=fieldID,proto3" json:"fieldID,omitempty"` - BinlogFiles []string `protobuf:"bytes,2,rep,name=binlog_files,json=binlogFiles,proto3" json:"binlog_files,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FieldBinlogFiles) Reset() { *m = FieldBinlogFiles{} } -func (m *FieldBinlogFiles) String() string { return proto.CompactTextString(m) } -func (*FieldBinlogFiles) ProtoMessage() {} -func (*FieldBinlogFiles) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{8} -} - -func (m *FieldBinlogFiles) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FieldBinlogFiles.Unmarshal(m, b) -} -func (m *FieldBinlogFiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FieldBinlogFiles.Marshal(b, m, deterministic) -} -func (m *FieldBinlogFiles) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldBinlogFiles.Merge(m, src) -} -func (m *FieldBinlogFiles) XXX_Size() int { - return xxx_messageInfo_FieldBinlogFiles.Size(m) -} -func (m *FieldBinlogFiles) XXX_DiscardUnknown() { - xxx_messageInfo_FieldBinlogFiles.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldBinlogFiles proto.InternalMessageInfo - -func (m *FieldBinlogFiles) GetFieldID() int64 { - if m != nil { - return m.FieldID - } - return 0 -} - -func (m *FieldBinlogFiles) GetBinlogFiles() []string { - if m != nil { - return m.BinlogFiles - } - return nil -} - -type SegmentMeta struct { - SegmentID int64 `protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"` - CollectionID int64 `protobuf:"varint,2,opt,name=collectionID,proto3" json:"collectionID,omitempty"` - PartitionTag string `protobuf:"bytes,3,opt,name=partition_tag,json=partitionTag,proto3" json:"partition_tag,omitempty"` - ChannelStart int32 `protobuf:"varint,4,opt,name=channel_start,json=channelStart,proto3" json:"channel_start,omitempty"` - ChannelEnd int32 `protobuf:"varint,5,opt,name=channel_end,json=channelEnd,proto3" json:"channel_end,omitempty"` - OpenTime uint64 `protobuf:"varint,6,opt,name=open_time,json=openTime,proto3" json:"open_time,omitempty"` - CloseTime uint64 `protobuf:"varint,7,opt,name=close_time,json=closeTime,proto3" json:"close_time,omitempty"` - NumRows int64 `protobuf:"varint,8,opt,name=num_rows,json=numRows,proto3" json:"num_rows,omitempty"` - MemSize int64 `protobuf:"varint,9,opt,name=mem_size,json=memSize,proto3" json:"mem_size,omitempty"` - BinlogFilePaths []*FieldBinlogFiles `protobuf:"bytes,10,rep,name=binlog_file_paths,json=binlogFilePaths,proto3" json:"binlog_file_paths,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SegmentMeta) Reset() { *m = SegmentMeta{} } -func (m *SegmentMeta) String() string { return proto.CompactTextString(m) } -func (*SegmentMeta) ProtoMessage() {} -func (*SegmentMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{9} -} - -func (m *SegmentMeta) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SegmentMeta.Unmarshal(m, b) -} -func (m *SegmentMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SegmentMeta.Marshal(b, m, deterministic) -} -func (m *SegmentMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_SegmentMeta.Merge(m, src) -} -func (m *SegmentMeta) XXX_Size() int { - return xxx_messageInfo_SegmentMeta.Size(m) -} -func (m *SegmentMeta) XXX_DiscardUnknown() { - xxx_messageInfo_SegmentMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_SegmentMeta proto.InternalMessageInfo - -func (m *SegmentMeta) GetSegmentID() int64 { - if m != nil { - return m.SegmentID - } - return 0 -} - -func (m *SegmentMeta) GetCollectionID() int64 { - if m != nil { - return m.CollectionID - } - return 0 -} - -func (m *SegmentMeta) GetPartitionTag() string { - if m != nil { - return m.PartitionTag - } - return "" -} - -func (m *SegmentMeta) GetChannelStart() int32 { - if m != nil { - return m.ChannelStart - } - return 0 -} - -func (m *SegmentMeta) GetChannelEnd() int32 { - if m != nil { - return m.ChannelEnd - } - return 0 -} - -func (m *SegmentMeta) GetOpenTime() uint64 { - if m != nil { - return m.OpenTime - } - return 0 -} - -func (m *SegmentMeta) GetCloseTime() uint64 { - if m != nil { - return m.CloseTime - } - return 0 -} - -func (m *SegmentMeta) GetNumRows() int64 { - if m != nil { - return m.NumRows - } - return 0 -} - -func (m *SegmentMeta) GetMemSize() int64 { - if m != nil { - return m.MemSize - } - return 0 -} - -func (m *SegmentMeta) GetBinlogFilePaths() []*FieldBinlogFiles { - if m != nil { - return m.BinlogFilePaths - } - return nil -} - -type FieldIndexMeta struct { - SegmentID int64 `protobuf:"varint,1,opt,name=segmentID,proto3" json:"segmentID,omitempty"` - FieldID int64 `protobuf:"varint,2,opt,name=fieldID,proto3" json:"fieldID,omitempty"` - IndexID int64 `protobuf:"varint,3,opt,name=indexID,proto3" json:"indexID,omitempty"` - IndexParams []*commonpb.KeyValuePair `protobuf:"bytes,4,rep,name=index_params,json=indexParams,proto3" json:"index_params,omitempty"` - State commonpb.IndexState `protobuf:"varint,5,opt,name=state,proto3,enum=milvus.proto.common.IndexState" json:"state,omitempty"` - IndexFilePaths []string `protobuf:"bytes,6,rep,name=index_file_paths,json=indexFilePaths,proto3" json:"index_file_paths,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FieldIndexMeta) Reset() { *m = FieldIndexMeta{} } -func (m *FieldIndexMeta) String() string { return proto.CompactTextString(m) } -func (*FieldIndexMeta) ProtoMessage() {} -func (*FieldIndexMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_975d306d62b73e88, []int{10} -} - -func (m *FieldIndexMeta) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FieldIndexMeta.Unmarshal(m, b) -} -func (m *FieldIndexMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FieldIndexMeta.Marshal(b, m, deterministic) -} -func (m *FieldIndexMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldIndexMeta.Merge(m, src) -} -func (m *FieldIndexMeta) XXX_Size() int { - return xxx_messageInfo_FieldIndexMeta.Size(m) -} -func (m *FieldIndexMeta) XXX_DiscardUnknown() { - xxx_messageInfo_FieldIndexMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldIndexMeta proto.InternalMessageInfo - -func (m *FieldIndexMeta) GetSegmentID() int64 { - if m != nil { - return m.SegmentID - } - return 0 -} - -func (m *FieldIndexMeta) GetFieldID() int64 { - if m != nil { - return m.FieldID - } - return 0 -} - -func (m *FieldIndexMeta) GetIndexID() int64 { - if m != nil { - return m.IndexID - } - return 0 -} - -func (m *FieldIndexMeta) GetIndexParams() []*commonpb.KeyValuePair { - if m != nil { - return m.IndexParams - } - return nil -} - -func (m *FieldIndexMeta) GetState() commonpb.IndexState { - if m != nil { - return m.State - } - return commonpb.IndexState_IndexStateNone -} - -func (m *FieldIndexMeta) GetIndexFilePaths() []string { - if m != nil { - return m.IndexFilePaths - } - return nil -} - func init() { proto.RegisterType((*TenantMeta)(nil), "milvus.proto.etcd.TenantMeta") proto.RegisterType((*ProxyMeta)(nil), "milvus.proto.etcd.ProxyMeta") - proto.RegisterType((*PartitionInfo)(nil), "milvus.proto.etcd.PartitionInfo") proto.RegisterType((*IndexInfo)(nil), "milvus.proto.etcd.IndexInfo") proto.RegisterType((*FieldIndexInfo)(nil), "milvus.proto.etcd.FieldIndexInfo") proto.RegisterType((*CollectionInfo)(nil), "milvus.proto.etcd.CollectionInfo") proto.RegisterType((*SegmentIndexInfo)(nil), "milvus.proto.etcd.SegmentIndexInfo") proto.RegisterType((*CollectionMeta)(nil), "milvus.proto.etcd.CollectionMeta") - proto.RegisterType((*FieldBinlogFiles)(nil), "milvus.proto.etcd.FieldBinlogFiles") - proto.RegisterType((*SegmentMeta)(nil), "milvus.proto.etcd.SegmentMeta") - proto.RegisterType((*FieldIndexMeta)(nil), "milvus.proto.etcd.FieldIndexMeta") } func init() { proto.RegisterFile("etcd_meta.proto", fileDescriptor_975d306d62b73e88) } var fileDescriptor_975d306d62b73e88 = []byte{ - // 899 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x8e, 0x1b, 0x45, - 0x10, 0xd6, 0xf8, 0x77, 0xa7, 0xfc, 0xb3, 0xbb, 0xcd, 0x8f, 0x86, 0x90, 0x10, 0xef, 0x44, 0x01, - 0x4b, 0x88, 0x5d, 0xb1, 0x01, 0x6e, 0x1c, 0x48, 0xcc, 0x4a, 0x16, 0x22, 0x31, 0xe3, 0x15, 0x07, - 0x2e, 0xa3, 0xb6, 0x5d, 0x6b, 0xb7, 0x34, 0xdd, 0x63, 0xa6, 0x7b, 0x92, 0xdd, 0x9c, 0xb8, 0xc2, - 0x23, 0x70, 0xe3, 0xa5, 0x78, 0x09, 0x9e, 0x01, 0x09, 0xf5, 0xcf, 0x8c, 0x67, 0x76, 0x1d, 0x84, - 0x22, 0x71, 0x73, 0x7d, 0x55, 0x35, 0x55, 0xf5, 0x7d, 0x55, 0x6d, 0x38, 0x44, 0xb5, 0x5c, 0xc5, - 0x1c, 0x15, 0x3d, 0xdd, 0x66, 0xa9, 0x4a, 0xc9, 0x31, 0x67, 0xc9, 0xcb, 0x5c, 0x5a, 0xeb, 0x54, - 0x7b, 0xef, 0xf5, 0x97, 0x29, 0xe7, 0xa9, 0xb0, 0xd0, 0xbd, 0xbe, 0x5c, 0x6e, 0x90, 0xbb, 0xf0, - 0xf0, 0x77, 0x0f, 0xe0, 0x12, 0x05, 0x15, 0xea, 0x7b, 0x54, 0x94, 0x0c, 0xa1, 0x31, 0x9d, 0x04, - 0xde, 0xc8, 0x1b, 0x37, 0xa3, 0xc6, 0x74, 0x42, 0x3e, 0x86, 0x43, 0x91, 0xf3, 0xf8, 0xe7, 0x1c, - 0xb3, 0x9b, 0x58, 0xa4, 0x2b, 0x94, 0x41, 0xc3, 0x38, 0x07, 0x22, 0xe7, 0x3f, 0x68, 0xf4, 0xb9, - 0x06, 0xc9, 0xa7, 0x70, 0xcc, 0x84, 0xc4, 0x4c, 0xc5, 0xcb, 0x0d, 0x15, 0x02, 0x93, 0xe9, 0x44, - 0x06, 0xcd, 0x51, 0x73, 0xec, 0x47, 0x47, 0xd6, 0xf1, 0xac, 0xc4, 0xc9, 0x27, 0x70, 0x68, 0x3f, - 0x58, 0xc6, 0x06, 0xad, 0x91, 0x37, 0xf6, 0xa3, 0xa1, 0x81, 0xcb, 0xc8, 0xf0, 0x17, 0x0f, 0xfc, - 0x59, 0x96, 0x5e, 0xdf, 0xec, 0xed, 0xed, 0x2b, 0xe8, 0xd2, 0xd5, 0x2a, 0x43, 0x69, 0x7b, 0xea, - 0x9d, 0xdf, 0x3f, 0xad, 0xcd, 0xee, 0xa6, 0xfe, 0xc6, 0xc6, 0x44, 0x45, 0xb0, 0xee, 0x35, 0x43, - 0x99, 0x27, 0xfb, 0x7a, 0xb5, 0x8e, 0x5d, 0xaf, 0xe1, 0x35, 0x0c, 0x66, 0x34, 0x53, 0x4c, 0xb1, - 0x54, 0x4c, 0xc5, 0x55, 0x4a, 0x1e, 0xc3, 0x70, 0x5b, 0x00, 0xb1, 0xa0, 0x1c, 0x4d, 0x47, 0x7e, - 0x34, 0x28, 0xd1, 0xe7, 0x94, 0x23, 0x19, 0x41, 0xaf, 0x04, 0xa6, 0x13, 0x47, 0x5a, 0x15, 0x22, - 0x1f, 0x01, 0x48, 0x5c, 0x73, 0x14, 0xaa, 0xa8, 0xdf, 0x8c, 0x2a, 0x48, 0xf8, 0x9b, 0x07, 0xfe, - 0x54, 0xac, 0xf0, 0xda, 0x94, 0x7d, 0x00, 0xc0, 0xb4, 0x51, 0x2d, 0xe9, 0x1b, 0xc4, 0x94, 0x0b, - 0xa0, 0x6b, 0x8c, 0xb2, 0x54, 0x61, 0x92, 0x09, 0xf4, 0x6d, 0xe2, 0x96, 0x66, 0x94, 0xdb, 0x42, - 0xbd, 0xf3, 0x93, 0xbd, 0x54, 0x7d, 0x87, 0x37, 0x3f, 0xd2, 0x24, 0xc7, 0x19, 0x65, 0x59, 0xd4, - 0x33, 0x69, 0x33, 0x93, 0x15, 0x4e, 0x60, 0x78, 0xc1, 0x30, 0x59, 0xed, 0x1a, 0x0a, 0xa0, 0x7b, - 0xc5, 0x12, 0x5c, 0x95, 0x92, 0x14, 0xe6, 0x9b, 0x7b, 0x09, 0xff, 0x6c, 0xc0, 0xf0, 0x59, 0x9a, - 0x24, 0xb8, 0x2c, 0xe9, 0xbc, 0x2d, 0xea, 0xd7, 0xd0, 0xb1, 0xfb, 0xe9, 0x34, 0x7d, 0x5c, 0x6f, - 0xd4, 0xed, 0xee, 0xee, 0x23, 0x73, 0x03, 0x44, 0x2e, 0x89, 0x3c, 0x84, 0xde, 0x32, 0x43, 0xaa, - 0x30, 0x56, 0x8c, 0x63, 0xd0, 0x1c, 0x79, 0xe3, 0x56, 0x04, 0x16, 0xba, 0x64, 0x1c, 0x49, 0x08, - 0xfd, 0x8a, 0x08, 0x32, 0x68, 0x19, 0xde, 0x6b, 0x18, 0xb9, 0x80, 0xc1, 0x95, 0x1e, 0x36, 0x36, - 0x7d, 0xa3, 0x0c, 0xda, 0xfb, 0x38, 0xd3, 0xa7, 0x75, 0x5a, 0x27, 0x25, 0xea, 0x5f, 0x95, 0x36, - 0x4a, 0x72, 0x0e, 0xef, 0xbd, 0x64, 0x99, 0xca, 0x69, 0x52, 0x6c, 0x9a, 0x51, 0x4f, 0x06, 0x1d, - 0xb3, 0x6c, 0xef, 0x38, 0xa7, 0xdb, 0x36, 0xad, 0xa3, 0x24, 0x5f, 0xc0, 0xfb, 0xdb, 0xcd, 0x8d, - 0x64, 0xcb, 0x3b, 0x49, 0x5d, 0x93, 0xf4, 0x6e, 0xe1, 0xad, 0x66, 0x85, 0x7f, 0x78, 0x70, 0x34, - 0x77, 0xab, 0x53, 0x2a, 0x74, 0x1f, 0xfc, 0x72, 0x9d, 0x1c, 0xc3, 0x3b, 0xc0, 0xea, 0xa7, 0x9b, - 0x2d, 0x55, 0x72, 0x66, 0x55, 0xbf, 0x66, 0x7d, 0x97, 0x02, 0xe8, 0x2e, 0x72, 0x66, 0x72, 0x5a, - 0xd6, 0xe3, 0x4c, 0x72, 0x02, 0x7d, 0x14, 0x74, 0x91, 0xa0, 0xe5, 0x2c, 0x68, 0x8f, 0xbc, 0xf1, - 0x41, 0xd4, 0xb3, 0x98, 0x69, 0x29, 0xfc, 0xcb, 0xab, 0x8a, 0xbf, 0xf7, 0xa2, 0xff, 0x6f, 0xf1, - 0xeb, 0x27, 0xd7, 0xba, 0x7d, 0x72, 0xf5, 0xdb, 0x56, 0x74, 0x6d, 0x95, 0xaf, 0xde, 0xf6, 0x25, - 0x5d, 0xcb, 0x3b, 0x3b, 0xd4, 0xb9, 0xbb, 0x43, 0xe1, 0x0b, 0x38, 0x32, 0xbb, 0xf1, 0x94, 0x89, - 0x24, 0x5d, 0x5f, 0xb0, 0x04, 0x65, 0x95, 0x72, 0xaf, 0x4e, 0xf9, 0x09, 0xf4, 0x17, 0x26, 0x30, - 0xd6, 0x47, 0xa4, 0xdf, 0x33, 0x5d, 0xb6, 0xb7, 0xd8, 0x25, 0x87, 0x7f, 0x37, 0xa0, 0xe7, 0x24, - 0x36, 0xdc, 0xfd, 0xbb, 0xba, 0x21, 0xf4, 0x97, 0xbb, 0x43, 0x2b, 0x24, 0xae, 0x61, 0xe4, 0x11, - 0x0c, 0x6a, 0xd3, 0x1a, 0xc2, 0xfc, 0xca, 0x1c, 0x97, 0x74, 0xad, 0x83, 0x8a, 0x35, 0x94, 0x8a, - 0x66, 0xca, 0x08, 0xdf, 0x8e, 0xfa, 0x0e, 0x9c, 0x6b, 0xcc, 0x10, 0xef, 0x82, 0x50, 0xac, 0x8c, - 0xf8, 0xed, 0x08, 0x1c, 0xf4, 0xad, 0x58, 0x91, 0x0f, 0xc1, 0x4f, 0xb7, 0x28, 0xac, 0x2e, 0x1d, - 0xa3, 0xcb, 0x81, 0x06, 0x8c, 0x2a, 0x0f, 0x00, 0x96, 0x49, 0x2a, 0x9d, 0x6a, 0x5d, 0xe3, 0xf5, - 0x0d, 0x62, 0xdc, 0x1f, 0xc0, 0x81, 0xfe, 0x0b, 0xca, 0xd2, 0x57, 0x32, 0x38, 0xb0, 0xb4, 0x89, - 0x9c, 0x47, 0xe9, 0x2b, 0xa9, 0x5d, 0x1c, 0x79, 0x2c, 0xd9, 0x6b, 0x0c, 0x7c, 0xeb, 0xe2, 0xc8, - 0xe7, 0xec, 0x35, 0x92, 0x17, 0x70, 0x5c, 0x61, 0x34, 0xde, 0x52, 0xb5, 0x91, 0x01, 0x98, 0x3b, - 0x7e, 0xf4, 0xa6, 0x3b, 0xae, 0x68, 0x15, 0x1d, 0xee, 0xb8, 0x9f, 0xe9, 0xdc, 0xf0, 0xd7, 0x46, - 0xf5, 0x09, 0xfc, 0x0f, 0x12, 0xbc, 0xcd, 0x81, 0xdd, 0x7e, 0xac, 0x5b, 0x6f, 0xf3, 0x58, 0x93, - 0x2f, 0xa1, 0x2d, 0x15, 0x55, 0x68, 0x84, 0x18, 0x9e, 0x3f, 0xdc, 0x9b, 0x6e, 0xc6, 0x98, 0xeb, - 0xb0, 0xc8, 0x46, 0x93, 0x31, 0x1c, 0xd9, 0xe2, 0x15, 0xc6, 0xec, 0x4b, 0x35, 0x34, 0x78, 0xc9, - 0xc5, 0xd3, 0x27, 0x3f, 0x7d, 0xbe, 0x66, 0x6a, 0x93, 0x2f, 0xf4, 0xc7, 0xce, 0xec, 0xd7, 0x3f, - 0x63, 0xa9, 0xfb, 0x75, 0xc6, 0x84, 0xc2, 0x4c, 0xd0, 0xe4, 0xcc, 0x14, 0x3c, 0xd3, 0x04, 0x6f, - 0x17, 0x8b, 0x8e, 0xb1, 0x9e, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x3a, 0xd8, 0x74, 0xb2, - 0x08, 0x00, 0x00, + // 642 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x41, 0x6f, 0xd3, 0x4c, + 0x10, 0x95, 0x93, 0x34, 0xa9, 0x27, 0x69, 0xda, 0xee, 0xf7, 0x81, 0xac, 0xaa, 0x40, 0x6a, 0x51, + 0x88, 0x84, 0x48, 0x44, 0x8b, 0xb8, 0x71, 0x80, 0x5a, 0x95, 0x22, 0x44, 0x55, 0xdc, 0x8a, 0x03, + 0x17, 0x6b, 0x63, 0x4f, 0x92, 0x95, 0xbc, 0xeb, 0xe0, 0x5d, 0x57, 0xcd, 0x8d, 0x33, 0x3f, 0x81, + 0x1b, 0xbf, 0x8f, 0xbf, 0xc0, 0x01, 0x79, 0xd7, 0x76, 0x92, 0x36, 0x1c, 0xb9, 0xf9, 0xbd, 0xd9, + 0xf1, 0xbe, 0x79, 0xf3, 0x16, 0x76, 0x51, 0x85, 0x51, 0xc0, 0x51, 0xd1, 0xc1, 0x3c, 0x4d, 0x54, + 0x42, 0xf6, 0x39, 0x8b, 0x6f, 0x32, 0x69, 0xd0, 0x20, 0xaf, 0x1e, 0x74, 0xc2, 0x84, 0xf3, 0x44, + 0x18, 0xea, 0xa0, 0x23, 0xc3, 0x19, 0xf2, 0xe2, 0xb8, 0xfb, 0xc3, 0x02, 0xb8, 0x46, 0x41, 0x85, + 0xfa, 0x88, 0x8a, 0x92, 0x2e, 0xd4, 0x46, 0x9e, 0x63, 0xf5, 0xac, 0x7e, 0xdd, 0xaf, 0x8d, 0x3c, + 0xf2, 0x0c, 0x76, 0x45, 0xc6, 0x83, 0xaf, 0x19, 0xa6, 0x8b, 0x40, 0x24, 0x11, 0x4a, 0xa7, 0xa6, + 0x8b, 0x3b, 0x22, 0xe3, 0x9f, 0x72, 0xf6, 0x22, 0x27, 0xc9, 0x0b, 0xd8, 0x67, 0x42, 0x62, 0xaa, + 0x82, 0x70, 0x46, 0x85, 0xc0, 0x78, 0xe4, 0x49, 0xa7, 0xde, 0xab, 0xf7, 0x6d, 0x7f, 0xcf, 0x14, + 0xce, 0x2a, 0x9e, 0x3c, 0x87, 0x5d, 0xf3, 0xc3, 0xea, 0xac, 0xd3, 0xe8, 0x59, 0x7d, 0xdb, 0xef, + 0x6a, 0xba, 0x3a, 0xe9, 0x7e, 0xb3, 0xc0, 0xbe, 0x4c, 0x93, 0xdb, 0xc5, 0x46, 0x6d, 0x6f, 0xa0, + 0x45, 0xa3, 0x28, 0x45, 0x69, 0x34, 0xb5, 0x4f, 0x0e, 0x07, 0x6b, 0xb3, 0x17, 0x53, 0xbf, 0x33, + 0x67, 0xfc, 0xf2, 0x70, 0xae, 0x35, 0x45, 0x99, 0xc5, 0x9b, 0xb4, 0x9a, 0xc2, 0x52, 0xab, 0xfb, + 0xdd, 0x02, 0x7b, 0x24, 0x22, 0xbc, 0x1d, 0x89, 0x49, 0x42, 0x1e, 0x01, 0xb0, 0x1c, 0x04, 0x82, + 0x72, 0xd4, 0x52, 0x6c, 0xdf, 0xd6, 0xcc, 0x05, 0xe5, 0x48, 0x1c, 0x68, 0x69, 0x30, 0xf2, 0x0a, + 0x97, 0x4a, 0x48, 0x3c, 0xe8, 0x98, 0xc6, 0x39, 0x4d, 0x29, 0x37, 0xd7, 0xb5, 0x4f, 0x8e, 0x36, + 0x0a, 0xfe, 0x80, 0x8b, 0xcf, 0x34, 0xce, 0xf0, 0x92, 0xb2, 0xd4, 0x6f, 0xeb, 0xb6, 0x4b, 0xdd, + 0xe5, 0x7a, 0xd0, 0x3d, 0x67, 0x18, 0x47, 0x4b, 0x41, 0x0e, 0xb4, 0x26, 0x2c, 0xc6, 0xa8, 0x32, + 0xa6, 0x84, 0x7f, 0xd7, 0xe2, 0xfe, 0xae, 0x41, 0xf7, 0x2c, 0x89, 0x63, 0x0c, 0x15, 0x4b, 0x84, + 0xfe, 0xcd, 0x5d, 0x6b, 0xdf, 0x42, 0xd3, 0xa4, 0xa4, 0x70, 0xf6, 0x78, 0x5d, 0x68, 0x91, 0xa0, + 0xe5, 0x4f, 0xae, 0x34, 0xe1, 0x17, 0x4d, 0xe4, 0x09, 0xb4, 0xc3, 0x14, 0xa9, 0xc2, 0x40, 0x31, + 0x8e, 0x4e, 0xbd, 0x67, 0xf5, 0x1b, 0x3e, 0x18, 0xea, 0x9a, 0x71, 0x24, 0x2e, 0x74, 0xe6, 0x34, + 0x55, 0x4c, 0x0b, 0xf0, 0xa4, 0xd3, 0xe8, 0xd5, 0xfb, 0x75, 0x7f, 0x8d, 0x23, 0x4f, 0x61, 0xc7, + 0xe0, 0x44, 0xe4, 0xe6, 0x4a, 0x67, 0x4b, 0xaf, 0x68, 0x9d, 0x24, 0xe7, 0xb0, 0x33, 0xc9, 0x2d, + 0x09, 0xf4, 0x74, 0x28, 0x9d, 0xe6, 0x26, 0x67, 0xf3, 0x67, 0x30, 0x58, 0xb7, 0xce, 0xef, 0x4c, + 0x2a, 0x8c, 0x92, 0x9c, 0xc0, 0x83, 0x1b, 0x96, 0xaa, 0x8c, 0xc6, 0x65, 0x2a, 0xf4, 0x8e, 0xa5, + 0xd3, 0xd2, 0xb7, 0xfe, 0x57, 0x14, 0x8b, 0x64, 0x98, 0xbb, 0x5f, 0xc3, 0xc3, 0xf9, 0x6c, 0x21, + 0x59, 0x78, 0xaf, 0x69, 0x5b, 0x37, 0xfd, 0x5f, 0x56, 0x57, 0xbb, 0xdc, 0x9f, 0x16, 0xec, 0x5d, + 0xe1, 0x94, 0xa3, 0x50, 0xcb, 0x3d, 0x1e, 0x82, 0x2d, 0x0b, 0xae, 0xdc, 0xc3, 0x92, 0x30, 0x5b, + 0xce, 0xc5, 0x56, 0xbb, 0x2c, 0xe0, 0xea, 0x96, 0xeb, 0xeb, 0x89, 0x73, 0xa0, 0x35, 0xce, 0x98, + 0xee, 0x69, 0x98, 0x4a, 0x01, 0xc9, 0x11, 0x74, 0x50, 0xd0, 0x71, 0x8c, 0xc6, 0x33, 0x67, 0xab, + 0x67, 0xf5, 0xb7, 0xfd, 0xb6, 0xe1, 0xb4, 0x24, 0xf7, 0x97, 0xb5, 0x1a, 0x91, 0x8d, 0xaf, 0xef, + 0x5f, 0x47, 0xe4, 0x31, 0x40, 0x65, 0x40, 0x19, 0x90, 0x15, 0x86, 0x1c, 0x43, 0xb7, 0x8a, 0x4b, + 0xa0, 0xe8, 0xf4, 0x4e, 0x3e, 0x58, 0x22, 0xae, 0xe9, 0x54, 0xde, 0x4b, 0x5a, 0xf3, 0x7e, 0xd2, + 0xde, 0x9f, 0x7e, 0x79, 0x35, 0x65, 0x6a, 0x96, 0x8d, 0xf3, 0x17, 0x38, 0x34, 0x63, 0xbc, 0x64, + 0x49, 0xf1, 0x35, 0x64, 0x42, 0x61, 0x2a, 0x68, 0x3c, 0xd4, 0x93, 0x0d, 0xf3, 0x2c, 0xcd, 0xc7, + 0xe3, 0xa6, 0x46, 0xa7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xc7, 0x82, 0x43, 0x81, 0x05, + 0x00, 0x00, } diff --git a/internal/proto/root_coord.proto b/internal/proto/root_coord.proto index b796740078..bab648361f 100644 --- a/internal/proto/root_coord.proto +++ b/internal/proto/root_coord.proto @@ -98,8 +98,6 @@ service RootCoord { rpc UpdateChannelTimeTick(internal.ChannelTimeTickMsg) returns (common.Status) {} rpc ReleaseDQLMessageStream(proxy.ReleaseDQLMessageStreamRequest) returns (common.Status) {} rpc SegmentFlushCompleted(data.SegmentFlushCompletedMsg) returns (common.Status) {} - rpc AddNewSegment(data.SegmentMsg) returns (common.Status) {} - } message AllocTimestampRequest { diff --git a/internal/proto/rootcoordpb/root_coord.pb.go b/internal/proto/rootcoordpb/root_coord.pb.go index c907c3a0ae..5e8e842ef4 100644 --- a/internal/proto/rootcoordpb/root_coord.pb.go +++ b/internal/proto/rootcoordpb/root_coord.pb.go @@ -243,56 +243,55 @@ func init() { func init() { proto.RegisterFile("root_coord.proto", fileDescriptor_4513485a144f6b06) } var fileDescriptor_4513485a144f6b06 = []byte{ - // 783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x5b, 0x4f, 0xdb, 0x48, - 0x14, 0xc7, 0x49, 0x60, 0x59, 0x71, 0x48, 0x02, 0x1a, 0x01, 0x8b, 0xb2, 0xac, 0xc4, 0x66, 0xb5, - 0x90, 0x70, 0x71, 0x10, 0x48, 0x55, 0x5f, 0x21, 0x51, 0x21, 0x52, 0x53, 0x15, 0x07, 0xa4, 0xde, - 0x50, 0x34, 0x71, 0x8e, 0x12, 0x0b, 0xdb, 0x63, 0x3c, 0x93, 0x42, 0x1f, 0xfb, 0x85, 0xfa, 0x19, - 0x2b, 0x5f, 0xc6, 0xb1, 0x1d, 0x3b, 0x18, 0xb5, 0x6f, 0x19, 0xcf, 0x6f, 0xfe, 0xff, 0x39, 0x97, - 0x68, 0x0e, 0xac, 0x3b, 0x8c, 0x89, 0xbe, 0xc6, 0x98, 0x33, 0x54, 0x6c, 0x87, 0x09, 0x46, 0xb6, - 0x4c, 0xdd, 0xf8, 0x3a, 0xe1, 0xfe, 0x4a, 0x71, 0xb7, 0xbd, 0xdd, 0x6a, 0x49, 0x63, 0xa6, 0xc9, - 0x2c, 0xff, 0x7b, 0xb5, 0x14, 0xa5, 0xaa, 0x15, 0xdd, 0x12, 0xe8, 0x58, 0xd4, 0x08, 0xd6, 0xab, - 0xb6, 0xc3, 0x9e, 0xbe, 0x05, 0x8b, 0xf5, 0x21, 0x15, 0x34, 0x6a, 0x51, 0xeb, 0xc3, 0xe6, 0xb9, - 0x61, 0x30, 0xed, 0x46, 0x37, 0x91, 0x0b, 0x6a, 0xda, 0x2a, 0x3e, 0x4c, 0x90, 0x0b, 0x72, 0x02, - 0x4b, 0x03, 0xca, 0x71, 0xbb, 0xb0, 0x5b, 0xa8, 0xaf, 0x9e, 0xee, 0x28, 0xb1, 0xab, 0x04, 0xfe, - 0x5d, 0x3e, 0xba, 0xa0, 0x1c, 0x55, 0x8f, 0x24, 0x1b, 0xf0, 0x87, 0xc6, 0x26, 0x96, 0xd8, 0x5e, - 0xdc, 0x2d, 0xd4, 0xcb, 0xaa, 0xbf, 0xa8, 0x7d, 0x2f, 0xc0, 0x56, 0xd2, 0x81, 0xdb, 0xcc, 0xe2, - 0x48, 0xce, 0x60, 0x99, 0x0b, 0x2a, 0x26, 0x3c, 0x30, 0xf9, 0x3b, 0xd5, 0xa4, 0xe7, 0x21, 0x6a, - 0x80, 0x92, 0x1d, 0x58, 0x11, 0x52, 0x69, 0xbb, 0xb8, 0x5b, 0xa8, 0x2f, 0xa9, 0xd3, 0x0f, 0x19, - 0x77, 0xf8, 0x00, 0x15, 0xef, 0x0a, 0x9d, 0xf6, 0x6f, 0x88, 0xae, 0x18, 0x55, 0x36, 0x60, 0x2d, - 0x54, 0xfe, 0x95, 0xa8, 0x2a, 0x50, 0xec, 0xb4, 0x3d, 0xe9, 0x45, 0xb5, 0xd8, 0x69, 0xa7, 0xc7, - 0x71, 0xfa, 0x83, 0xc0, 0x8a, 0xca, 0x98, 0x68, 0xb9, 0x05, 0x24, 0x36, 0x90, 0x4b, 0x14, 0x2d, - 0x66, 0xda, 0xcc, 0x42, 0x4b, 0xb8, 0x8a, 0xc8, 0xc9, 0x49, 0xdc, 0x2e, 0xec, 0x86, 0x59, 0x34, - 0xc8, 0x45, 0x75, 0x2f, 0xe3, 0x44, 0x02, 0xaf, 0x2d, 0x10, 0xd3, 0x73, 0x74, 0x0b, 0x79, 0xa3, - 0x6b, 0xf7, 0xad, 0x31, 0xb5, 0x2c, 0x34, 0xe6, 0x39, 0x26, 0x50, 0xe9, 0xf8, 0x5f, 0xfc, 0x44, - 0xb0, 0xe8, 0x09, 0x47, 0xb7, 0x46, 0x32, 0x8f, 0xb5, 0x05, 0xf2, 0x00, 0x1b, 0x97, 0xe8, 0xb9, - 0xeb, 0x5c, 0xe8, 0x1a, 0x97, 0x86, 0xa7, 0xd9, 0x86, 0x33, 0xf0, 0x0b, 0x2d, 0xfb, 0xb0, 0xde, - 0x72, 0x90, 0x0a, 0x6c, 0x31, 0xc3, 0x40, 0x4d, 0xe8, 0xcc, 0x22, 0x47, 0xa9, 0x47, 0x93, 0x98, - 0x34, 0x9a, 0x57, 0xee, 0xda, 0x02, 0xf9, 0x0c, 0x95, 0xb6, 0xc3, 0xec, 0x88, 0xfc, 0x41, 0xaa, - 0x7c, 0x1c, 0xca, 0x29, 0xde, 0x87, 0xf2, 0x15, 0xe5, 0x11, 0xed, 0x46, 0xaa, 0x76, 0x8c, 0x91, - 0xd2, 0xff, 0xa6, 0xa2, 0x17, 0x8c, 0x19, 0x91, 0xf4, 0x3c, 0x02, 0x69, 0x23, 0xd7, 0x1c, 0x7d, - 0x10, 0x4d, 0x90, 0x92, 0x1e, 0xc1, 0x0c, 0x28, 0xad, 0x9a, 0xb9, 0xf9, 0xd0, 0xd8, 0x82, 0xb5, - 0xde, 0x98, 0x3d, 0x4e, 0xf7, 0x38, 0x39, 0x4c, 0xaf, 0x68, 0x9c, 0x92, 0x96, 0x47, 0xf9, 0xe0, - 0xd0, 0xef, 0x0e, 0xd6, 0xfc, 0x02, 0xbf, 0xa7, 0x8e, 0xd0, 0xbd, 0x28, 0x0f, 0xe7, 0xb4, 0x41, - 0x48, 0xe5, 0x2c, 0xd4, 0x47, 0x28, 0xbb, 0x05, 0x9e, 0x8a, 0x37, 0x32, 0x9b, 0xe0, 0xa5, 0xd2, - 0x77, 0x50, 0xba, 0xa2, 0x7c, 0xaa, 0x5c, 0xcf, 0x6a, 0x81, 0x19, 0xe1, 0x5c, 0x1d, 0x70, 0x0f, - 0x15, 0x37, 0x6b, 0xe1, 0x61, 0x9e, 0xd1, 0xbf, 0x71, 0x48, 0x5a, 0x1c, 0xe6, 0x62, 0xa3, 0x55, - 0x97, 0x5d, 0xd1, 0xc3, 0x91, 0x89, 0x96, 0xc8, 0xa8, 0x42, 0x82, 0x9a, 0x5f, 0xf5, 0x19, 0x38, - 0xf4, 0x43, 0x28, 0xb9, 0x77, 0x09, 0x36, 0x78, 0x46, 0xee, 0xa2, 0x88, 0x74, 0x6a, 0xe4, 0x20, - 0x43, 0x9b, 0x5b, 0x58, 0xf5, 0xdb, 0xa6, 0x63, 0x0d, 0xf1, 0x89, 0xec, 0xcf, 0x69, 0x2c, 0x8f, - 0xc8, 0x59, 0xf9, 0x31, 0x94, 0x65, 0x68, 0xbe, 0x70, 0x63, 0x6e, 0xf8, 0x31, 0xe9, 0x83, 0x3c, - 0x68, 0x18, 0xc0, 0x35, 0xac, 0xb8, 0xad, 0xe9, 0xbb, 0xfc, 0x9f, 0xd9, 0xba, 0x2f, 0xb9, 0xfc, - 0x43, 0xf0, 0x44, 0x87, 0x53, 0x02, 0x39, 0x56, 0xd2, 0xa7, 0x1f, 0x25, 0x75, 0x5e, 0xa9, 0x2a, - 0x79, 0xf1, 0x30, 0x8a, 0x2f, 0xf0, 0x67, 0xf0, 0x76, 0x93, 0xbd, 0xb9, 0x87, 0xc3, 0xb1, 0xa1, - 0xba, 0xff, 0x2c, 0x17, 0xaa, 0x53, 0xd8, 0xbc, 0xb5, 0x87, 0xee, 0x13, 0xe1, 0x3f, 0x44, 0xf2, - 0x29, 0x4c, 0x56, 0x65, 0xfa, 0xdc, 0xc6, 0xb9, 0x2e, 0x1f, 0x3d, 0x97, 0x33, 0x03, 0xfe, 0x52, - 0xd1, 0x40, 0xca, 0xb1, 0x7d, 0xfd, 0xb6, 0x8b, 0x9c, 0xd3, 0x11, 0xf6, 0x84, 0x83, 0xd4, 0x4c, - 0x3e, 0x91, 0xfe, 0x0c, 0x98, 0x01, 0xe7, 0xac, 0x90, 0x06, 0x9b, 0x41, 0x2f, 0xbf, 0x31, 0x26, - 0x7c, 0xec, 0x4e, 0x07, 0x06, 0x0a, 0x1c, 0x26, 0xff, 0x92, 0xee, 0x88, 0xa9, 0xa4, 0x92, 0x39, - 0x42, 0xea, 0x42, 0xf9, 0x7c, 0x38, 0x7c, 0x87, 0xf2, 0x6f, 0x43, 0xfe, 0xc9, 0x16, 0x7f, 0x5e, - 0xee, 0xe2, 0xf5, 0xa7, 0x57, 0x23, 0x5d, 0x8c, 0x27, 0x03, 0x77, 0xa7, 0xe9, 0xa3, 0xc7, 0x3a, - 0x0b, 0x7e, 0x35, 0x65, 0xee, 0x9b, 0xde, 0xe9, 0x66, 0x58, 0x4e, 0x7b, 0x30, 0x58, 0xf6, 0x3e, - 0x9d, 0xfd, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x08, 0x58, 0x69, 0x9b, 0x95, 0x0b, 0x00, 0x00, + // 765 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x5b, 0x4f, 0xdb, 0x30, + 0x14, 0xc7, 0x69, 0x61, 0x4c, 0x1c, 0xda, 0xc2, 0x2c, 0x60, 0xa8, 0xe3, 0x81, 0x75, 0x1a, 0xb4, + 0x5c, 0x52, 0x04, 0xd2, 0xb4, 0xd7, 0xd1, 0x6a, 0x50, 0x69, 0x48, 0x23, 0x05, 0x69, 0x37, 0x54, + 0xb9, 0xe9, 0x51, 0x1b, 0x91, 0xc4, 0x21, 0x76, 0x07, 0x7b, 0xdc, 0x27, 0xdd, 0x57, 0x99, 0x72, + 0x73, 0x93, 0x34, 0x29, 0x41, 0xdb, 0x5b, 0x1d, 0xff, 0xfc, 0xff, 0xfb, 0x5c, 0x2a, 0x1f, 0x58, + 0x75, 0x18, 0x13, 0x3d, 0x8d, 0x31, 0x67, 0xa0, 0xd8, 0x0e, 0x13, 0x8c, 0x6c, 0x98, 0xba, 0xf1, + 0x73, 0xcc, 0xfd, 0x95, 0xe2, 0x6e, 0x7b, 0xbb, 0xd5, 0x92, 0xc6, 0x4c, 0x93, 0x59, 0xfe, 0xf7, + 0x6a, 0x29, 0x4a, 0x55, 0x2b, 0xba, 0x25, 0xd0, 0xb1, 0xa8, 0x11, 0xac, 0x97, 0x6d, 0x87, 0x3d, + 0xfc, 0x0a, 0x16, 0xab, 0x03, 0x2a, 0x68, 0xd4, 0xa2, 0xd6, 0x83, 0xf5, 0x0f, 0x86, 0xc1, 0xb4, + 0x2b, 0xdd, 0x44, 0x2e, 0xa8, 0x69, 0xab, 0x78, 0x37, 0x46, 0x2e, 0xc8, 0x11, 0x2c, 0xf4, 0x29, + 0xc7, 0xcd, 0xc2, 0x76, 0xa1, 0xbe, 0x7c, 0xbc, 0xa5, 0xc4, 0xae, 0x12, 0xf8, 0x5f, 0xf0, 0xe1, + 0x29, 0xe5, 0xa8, 0x7a, 0x24, 0x59, 0x83, 0x67, 0x1a, 0x1b, 0x5b, 0x62, 0x73, 0x7e, 0xbb, 0x50, + 0x2f, 0xab, 0xfe, 0xa2, 0xf6, 0xbb, 0x00, 0x1b, 0x49, 0x07, 0x6e, 0x33, 0x8b, 0x23, 0x39, 0x81, + 0x45, 0x2e, 0xa8, 0x18, 0xf3, 0xc0, 0xe4, 0x55, 0xaa, 0x49, 0xd7, 0x43, 0xd4, 0x00, 0x25, 0x5b, + 0xb0, 0x24, 0x42, 0xa5, 0xcd, 0xe2, 0x76, 0xa1, 0xbe, 0xa0, 0x4e, 0x3e, 0x64, 0xdc, 0xe1, 0x0b, + 0x54, 0xbc, 0x2b, 0x74, 0xda, 0xff, 0x21, 0xba, 0x62, 0x54, 0xd9, 0x80, 0x15, 0xa9, 0xfc, 0x2f, + 0x51, 0x55, 0xa0, 0xd8, 0x69, 0x7b, 0xd2, 0xf3, 0x6a, 0xb1, 0xd3, 0x4e, 0x8f, 0xe3, 0xf8, 0xcf, + 0x0b, 0x58, 0x52, 0x19, 0x13, 0x2d, 0xb7, 0x80, 0xc4, 0x06, 0x72, 0x86, 0xa2, 0xc5, 0x4c, 0x9b, + 0x59, 0x68, 0x09, 0x57, 0x11, 0x39, 0x39, 0x8a, 0xdb, 0xc9, 0x6e, 0x98, 0x46, 0x83, 0x5c, 0x54, + 0x77, 0x32, 0x4e, 0x24, 0xf0, 0xda, 0x1c, 0x31, 0x3d, 0x47, 0xb7, 0x90, 0x57, 0xba, 0x76, 0xdb, + 0x1a, 0x51, 0xcb, 0x42, 0x63, 0x96, 0x63, 0x02, 0x0d, 0x1d, 0xdf, 0xc4, 0x4f, 0x04, 0x8b, 0xae, + 0x70, 0x74, 0x6b, 0x18, 0xe6, 0xb1, 0x36, 0x47, 0xee, 0x60, 0xed, 0x0c, 0x3d, 0x77, 0x9d, 0x0b, + 0x5d, 0xe3, 0xa1, 0xe1, 0x71, 0xb6, 0xe1, 0x14, 0xfc, 0x44, 0xcb, 0x1e, 0xac, 0xb6, 0x1c, 0xa4, + 0x02, 0x5b, 0xcc, 0x30, 0x50, 0x13, 0x3a, 0xb3, 0xc8, 0x41, 0xea, 0xd1, 0x24, 0x16, 0x1a, 0xcd, + 0x2a, 0x77, 0x6d, 0x8e, 0x7c, 0x87, 0x4a, 0xdb, 0x61, 0x76, 0x44, 0x7e, 0x2f, 0x55, 0x3e, 0x0e, + 0xe5, 0x14, 0xef, 0x41, 0xf9, 0x9c, 0xf2, 0x88, 0x76, 0x23, 0x55, 0x3b, 0xc6, 0x84, 0xd2, 0xaf, + 0x53, 0xd1, 0x53, 0xc6, 0x8c, 0x48, 0x7a, 0xee, 0x81, 0xb4, 0x91, 0x6b, 0x8e, 0xde, 0x8f, 0x26, + 0x48, 0x49, 0x8f, 0x60, 0x0a, 0x0c, 0xad, 0x9a, 0xb9, 0x79, 0x69, 0x6c, 0xc1, 0x4a, 0x77, 0xc4, + 0xee, 0x27, 0x7b, 0x9c, 0xec, 0xa7, 0x57, 0x34, 0x4e, 0x85, 0x96, 0x07, 0xf9, 0x60, 0xe9, 0x77, + 0x03, 0x2b, 0x7e, 0x81, 0x3f, 0x53, 0x47, 0xe8, 0x5e, 0x94, 0xfb, 0x33, 0xda, 0x40, 0x52, 0x39, + 0x0b, 0xf5, 0x15, 0xca, 0x6e, 0x81, 0x27, 0xe2, 0x8d, 0xcc, 0x26, 0x78, 0xaa, 0xf4, 0x0d, 0x94, + 0xce, 0x29, 0x9f, 0x28, 0xd7, 0xb3, 0x5a, 0x60, 0x4a, 0x38, 0x57, 0x07, 0xdc, 0x42, 0xc5, 0xcd, + 0x9a, 0x3c, 0xcc, 0x33, 0xfa, 0x37, 0x0e, 0x85, 0x16, 0xfb, 0xb9, 0xd8, 0x68, 0xd5, 0xc3, 0xae, + 0xe8, 0xe2, 0xd0, 0x44, 0x4b, 0x64, 0x54, 0x21, 0x41, 0xcd, 0xae, 0xfa, 0x14, 0x2c, 0xfd, 0x10, + 0x4a, 0xee, 0x5d, 0x82, 0x0d, 0x9e, 0x91, 0xbb, 0x28, 0x12, 0x3a, 0x35, 0x72, 0x90, 0xd2, 0xe6, + 0x1a, 0x96, 0xfd, 0xb6, 0xe9, 0x58, 0x03, 0x7c, 0x20, 0xbb, 0x33, 0x1a, 0xcb, 0x23, 0x72, 0x56, + 0x7e, 0x04, 0xe5, 0x30, 0x34, 0x5f, 0xb8, 0x31, 0x33, 0xfc, 0x98, 0xf4, 0x5e, 0x1e, 0x54, 0x06, + 0x70, 0x09, 0x4b, 0x6e, 0x6b, 0xfa, 0x2e, 0x6f, 0x33, 0x5b, 0xf7, 0x29, 0x97, 0xbf, 0x0b, 0x9e, + 0x68, 0x39, 0x25, 0x90, 0x43, 0x25, 0x7d, 0xfa, 0x51, 0x52, 0xe7, 0x95, 0xaa, 0x92, 0x17, 0x97, + 0x51, 0xfc, 0x80, 0xe7, 0xc1, 0xdb, 0x4d, 0x76, 0x66, 0x1e, 0x96, 0x63, 0x43, 0x75, 0xf7, 0x51, + 0x4e, 0xaa, 0x53, 0x58, 0xbf, 0xb6, 0x07, 0xee, 0x13, 0xe1, 0x3f, 0x44, 0xe1, 0x53, 0x98, 0xac, + 0xca, 0xe4, 0xb9, 0x8d, 0x73, 0x17, 0x7c, 0xf8, 0x58, 0xce, 0x0c, 0x78, 0xa9, 0xa2, 0x81, 0x94, + 0x63, 0xfb, 0xf2, 0xd3, 0x05, 0x72, 0x4e, 0x87, 0xd8, 0x15, 0x0e, 0x52, 0x33, 0xf9, 0x44, 0xfa, + 0x33, 0x60, 0x06, 0x9c, 0xb3, 0x42, 0x1a, 0xac, 0x07, 0xbd, 0xfc, 0xd1, 0x18, 0xf3, 0x91, 0x3b, + 0x1d, 0x18, 0x28, 0x70, 0x90, 0xfc, 0x4b, 0xba, 0x23, 0xa6, 0x92, 0x4a, 0x3e, 0x1e, 0xd2, 0xe9, + 0xfb, 0x6f, 0xef, 0x86, 0xba, 0x18, 0x8d, 0xfb, 0xee, 0x4e, 0xd3, 0x47, 0x0f, 0x75, 0x16, 0xfc, + 0x6a, 0x86, 0xc9, 0x6a, 0x7a, 0xa7, 0x9b, 0x32, 0xff, 0x76, 0xbf, 0xbf, 0xe8, 0x7d, 0x3a, 0xf9, + 0x1b, 0x00, 0x00, 0xff, 0xff, 0x39, 0x40, 0xa4, 0x9c, 0x46, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -375,7 +374,6 @@ type RootCoordClient interface { UpdateChannelTimeTick(ctx context.Context, in *internalpb.ChannelTimeTickMsg, opts ...grpc.CallOption) (*commonpb.Status, error) ReleaseDQLMessageStream(ctx context.Context, in *proxypb.ReleaseDQLMessageStreamRequest, opts ...grpc.CallOption) (*commonpb.Status, error) SegmentFlushCompleted(ctx context.Context, in *datapb.SegmentFlushCompletedMsg, opts ...grpc.CallOption) (*commonpb.Status, error) - AddNewSegment(ctx context.Context, in *datapb.SegmentMsg, opts ...grpc.CallOption) (*commonpb.Status, error) } type rootCoordClient struct { @@ -584,15 +582,6 @@ func (c *rootCoordClient) SegmentFlushCompleted(ctx context.Context, in *datapb. return out, nil } -func (c *rootCoordClient) AddNewSegment(ctx context.Context, in *datapb.SegmentMsg, opts ...grpc.CallOption) (*commonpb.Status, error) { - out := new(commonpb.Status) - err := c.cc.Invoke(ctx, "/milvus.proto.rootcoord.RootCoord/AddNewSegment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // RootCoordServer is the server API for RootCoord service. type RootCoordServer interface { GetComponentStates(context.Context, *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) @@ -663,7 +652,6 @@ type RootCoordServer interface { UpdateChannelTimeTick(context.Context, *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) ReleaseDQLMessageStream(context.Context, *proxypb.ReleaseDQLMessageStreamRequest) (*commonpb.Status, error) SegmentFlushCompleted(context.Context, *datapb.SegmentFlushCompletedMsg) (*commonpb.Status, error) - AddNewSegment(context.Context, *datapb.SegmentMsg) (*commonpb.Status, error) } // UnimplementedRootCoordServer can be embedded to have forward compatible implementations. @@ -736,9 +724,6 @@ func (*UnimplementedRootCoordServer) ReleaseDQLMessageStream(ctx context.Context func (*UnimplementedRootCoordServer) SegmentFlushCompleted(ctx context.Context, req *datapb.SegmentFlushCompletedMsg) (*commonpb.Status, error) { return nil, status.Errorf(codes.Unimplemented, "method SegmentFlushCompleted not implemented") } -func (*UnimplementedRootCoordServer) AddNewSegment(ctx context.Context, req *datapb.SegmentMsg) (*commonpb.Status, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddNewSegment not implemented") -} func RegisterRootCoordServer(s *grpc.Server, srv RootCoordServer) { s.RegisterService(&_RootCoord_serviceDesc, srv) @@ -1140,24 +1125,6 @@ func _RootCoord_SegmentFlushCompleted_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _RootCoord_AddNewSegment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(datapb.SegmentMsg) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RootCoordServer).AddNewSegment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/milvus.proto.rootcoord.RootCoord/AddNewSegment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RootCoordServer).AddNewSegment(ctx, req.(*datapb.SegmentMsg)) - } - return interceptor(ctx, in, info, handler) -} - var _RootCoord_serviceDesc = grpc.ServiceDesc{ ServiceName: "milvus.proto.rootcoord.RootCoord", HandlerType: (*RootCoordServer)(nil), @@ -1250,10 +1217,6 @@ var _RootCoord_serviceDesc = grpc.ServiceDesc{ MethodName: "SegmentFlushCompleted", Handler: _RootCoord_SegmentFlushCompleted_Handler, }, - { - MethodName: "AddNewSegment", - Handler: _RootCoord_AddNewSegment_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "root_coord.proto", diff --git a/internal/rootcoord/meta_table.go b/internal/rootcoord/meta_table.go index 1ac8b69708..7d1fd09eab 100644 --- a/internal/rootcoord/meta_table.go +++ b/internal/rootcoord/meta_table.go @@ -24,7 +24,6 @@ import ( "github.com/milvus-io/milvus/internal/kv" "github.com/milvus-io/milvus/internal/log" "github.com/milvus-io/milvus/internal/proto/commonpb" - "github.com/milvus-io/milvus/internal/proto/datapb" pb "github.com/milvus-io/milvus/internal/proto/etcdpb" "github.com/milvus-io/milvus/internal/proto/schemapb" "github.com/milvus-io/milvus/internal/util/typeutil" @@ -35,17 +34,11 @@ const ( TenantMetaPrefix = ComponentPrefix + "/tenant" ProxyMetaPrefix = ComponentPrefix + "/proxy" CollectionMetaPrefix = ComponentPrefix + "/collection" - PartitionMetaPrefix = ComponentPrefix + "/partition" SegmentIndexMetaPrefix = ComponentPrefix + "/segment-index" IndexMetaPrefix = ComponentPrefix + "/index" TimestampPrefix = ComponentPrefix + "/timestamp" - SegInfoMsgStartPosPrefix = ComponentPrefix + "/seg-info-msg-start-position" - SegInfoMsgEndPosPrefix = ComponentPrefix + "/seg-info-msg-end-position" - FlushedSegMsgStartPosPrefix = ComponentPrefix + "/flushed-seg-msg-start-position" - FlushedSegMsgEndPosPrefix = ComponentPrefix + "/flushed-seg-msg-end-position" - DDOperationPrefix = ComponentPrefix + "/dd-operation" DDMsgSendPrefix = ComponentPrefix + "/dd-msg-send" @@ -56,18 +49,13 @@ const ( ) type metaTable struct { - client kv.SnapShotKV // client of a reliable kv service, i.e. etcd client - tenantID2Meta map[typeutil.UniqueID]pb.TenantMeta // tenant id to tenant meta - proxyID2Meta map[typeutil.UniqueID]pb.ProxyMeta // proxy id to proxy meta - collID2Meta map[typeutil.UniqueID]pb.CollectionInfo // collection_id -> meta - collName2ID map[string]typeutil.UniqueID // collection name to collection id - partitionID2Meta map[typeutil.UniqueID]pb.PartitionInfo // collection_id/partition_id -> meta - segID2IndexMeta map[typeutil.UniqueID]*map[typeutil.UniqueID]pb.SegmentIndexInfo // collection_id/index_id/partition_id/segment_id -> meta - indexID2Meta map[typeutil.UniqueID]pb.IndexInfo // collection_id/index_id -> meta - segID2CollID map[typeutil.UniqueID]typeutil.UniqueID // segment id -> collection id - segID2PartitionID map[typeutil.UniqueID]typeutil.UniqueID // segment id -> partition id - flushedSegID map[typeutil.UniqueID]bool // flushed segment id - partitionID2CollID map[typeutil.UniqueID]typeutil.UniqueID // partition id -> collection id + client kv.SnapShotKV // client of a reliable kv service, i.e. etcd client + tenantID2Meta map[typeutil.UniqueID]pb.TenantMeta // tenant id to tenant meta + proxyID2Meta map[typeutil.UniqueID]pb.ProxyMeta // proxy id to proxy meta + collID2Meta map[typeutil.UniqueID]pb.CollectionInfo // collection_id -> meta + collName2ID map[string]typeutil.UniqueID // collection name to collection id + segID2IndexMeta map[typeutil.UniqueID]map[typeutil.UniqueID]pb.SegmentIndexInfo // collection_id/index_id/partition_id/segment_id -> meta + indexID2Meta map[typeutil.UniqueID]pb.IndexInfo // collection_id/index_id -> meta tenantLock sync.RWMutex proxyLock sync.RWMutex @@ -94,13 +82,8 @@ func (mt *metaTable) reloadFromKV() error { mt.proxyID2Meta = make(map[typeutil.UniqueID]pb.ProxyMeta) mt.collID2Meta = make(map[typeutil.UniqueID]pb.CollectionInfo) mt.collName2ID = make(map[string]typeutil.UniqueID) - mt.partitionID2Meta = make(map[typeutil.UniqueID]pb.PartitionInfo) - mt.segID2IndexMeta = make(map[typeutil.UniqueID]*map[typeutil.UniqueID]pb.SegmentIndexInfo) + mt.segID2IndexMeta = make(map[typeutil.UniqueID]map[typeutil.UniqueID]pb.SegmentIndexInfo) mt.indexID2Meta = make(map[typeutil.UniqueID]pb.IndexInfo) - mt.partitionID2CollID = make(map[typeutil.UniqueID]typeutil.UniqueID) - mt.segID2CollID = make(map[typeutil.UniqueID]typeutil.UniqueID) - mt.segID2PartitionID = make(map[typeutil.UniqueID]typeutil.UniqueID) - mt.flushedSegID = make(map[typeutil.UniqueID]bool) _, values, err := mt.client.LoadWithPrefix(TenantMetaPrefix, 0) if err != nil { @@ -143,32 +126,6 @@ func (mt *metaTable) reloadFromKV() error { } mt.collID2Meta[collInfo.ID] = collInfo mt.collName2ID[collInfo.Schema.Name] = collInfo.ID - for _, partID := range collInfo.PartitionIDs { - mt.partitionID2CollID[partID] = collInfo.ID - } - } - - _, values, err = mt.client.LoadWithPrefix(PartitionMetaPrefix, 0) - if err != nil { - return err - } - for _, value := range values { - partitionInfo := pb.PartitionInfo{} - err = proto.UnmarshalText(value, &partitionInfo) - if err != nil { - return fmt.Errorf("RootCoord UnmarshalText pb.PartitionInfo err:%w", err) - } - collID, ok := mt.partitionID2CollID[partitionInfo.PartitionID] - if !ok { - log.Warn("partition does not belong to any collection", zap.Int64("partition id", partitionInfo.PartitionID)) - continue - } - mt.partitionID2Meta[partitionInfo.PartitionID] = partitionInfo - for _, segID := range partitionInfo.SegmentIDs { - mt.segID2CollID[segID] = collID - mt.segID2PartitionID[segID] = partitionInfo.PartitionID - mt.flushedSegID[segID] = true - } } _, values, err = mt.client.LoadWithPrefix(SegmentIndexMetaPrefix, 0) @@ -183,11 +140,11 @@ func (mt *metaTable) reloadFromKV() error { } idx, ok := mt.segID2IndexMeta[segmentIndexInfo.SegmentID] if ok { - (*idx)[segmentIndexInfo.IndexID] = segmentIndexInfo + idx[segmentIndexInfo.IndexID] = segmentIndexInfo } else { meta := make(map[typeutil.UniqueID]pb.SegmentIndexInfo) meta[segmentIndexInfo.IndexID] = segmentIndexInfo - mt.segID2IndexMeta[segmentIndexInfo.SegmentID] = &meta + mt.segID2IndexMeta[segmentIndexInfo.SegmentID] = meta } } @@ -251,14 +208,11 @@ func (mt *metaTable) AddProxy(po *pb.ProxyMeta) (typeutil.Timestamp, error) { return ts, nil } -func (mt *metaTable) AddCollection(coll *pb.CollectionInfo, part *pb.PartitionInfo, idx []*pb.IndexInfo, ddOpStr func(ts typeutil.Timestamp) (string, error)) (typeutil.Timestamp, error) { +func (mt *metaTable) AddCollection(coll *pb.CollectionInfo, partID typeutil.UniqueID, partName string, idx []*pb.IndexInfo, ddOpStr func(ts typeutil.Timestamp) (string, error)) (typeutil.Timestamp, error) { mt.ddLock.Lock() defer mt.ddLock.Unlock() - if len(part.SegmentIDs) != 0 { - return 0, errors.New("segment should be empty when creating collection") - } - if len(coll.PartitionIDs) != 0 { + if len(coll.PartitionIDs) != 0 || len(coll.PartitonNames) != 0 { return 0, errors.New("partitions should be empty when creating collection") } if _, ok := mt.collName2ID[coll.Schema.Name]; ok { @@ -267,24 +221,18 @@ func (mt *metaTable) AddCollection(coll *pb.CollectionInfo, part *pb.PartitionIn if len(coll.FieldIndexes) != len(idx) { return 0, fmt.Errorf("incorrect index id when creating collection") } - if _, ok := mt.partitionID2Meta[part.PartitionID]; ok { - return 0, fmt.Errorf("partition id = %d exist", part.PartitionID) - } - coll.PartitionIDs = append(coll.PartitionIDs, part.PartitionID) + coll.PartitionIDs = append(coll.PartitionIDs, partID) + coll.PartitonNames = append(coll.PartitonNames, partName) mt.collID2Meta[coll.ID] = *coll mt.collName2ID[coll.Schema.Name] = coll.ID - mt.partitionID2Meta[part.PartitionID] = *part - mt.partitionID2CollID[part.PartitionID] = coll.ID for _, i := range idx { mt.indexID2Meta[i.IndexID] = *i } k1 := fmt.Sprintf("%s/%d", CollectionMetaPrefix, coll.ID) v1 := proto.MarshalTextString(coll) - k2 := fmt.Sprintf("%s/%d/%d", PartitionMetaPrefix, coll.ID, part.PartitionID) - v2 := proto.MarshalTextString(part) - meta := map[string]string{k1: v1, k2: v2} + meta := map[string]string{k1: v1} for _, i := range idx { k := fmt.Sprintf("%s/%d/%d", IndexMetaPrefix, coll.ID, i.IndexID) @@ -303,7 +251,7 @@ func (mt *metaTable) AddCollection(coll *pb.CollectionInfo, part *pb.PartitionIn return ts, nil } -func (mt *metaTable) DeleteCollection(collID typeutil.UniqueID, ddOpStr func(ts typeutil.Timestamp) (string, error)) (typeutil.Timestamp, error) { +func (mt *metaTable) DeleteCollection(collID typeutil.UniqueID, segIDs []typeutil.UniqueID, ddOpStr func(ts typeutil.Timestamp) (string, error)) (typeutil.Timestamp, error) { mt.ddLock.Lock() defer mt.ddLock.Unlock() @@ -314,24 +262,13 @@ func (mt *metaTable) DeleteCollection(collID typeutil.UniqueID, ddOpStr func(ts delete(mt.collID2Meta, collID) delete(mt.collName2ID, collMeta.Schema.Name) - for _, partID := range collMeta.PartitionIDs { - partMeta, ok := mt.partitionID2Meta[partID] + for _, segID := range segIDs { + _, ok := mt.segID2IndexMeta[segID] if !ok { - log.Warn("partition id not exist", zap.Int64("partition id", partID)) + log.Warn("segment id not exist", zap.Int64("segment id", segID)) continue } - delete(mt.partitionID2Meta, partID) - for _, segID := range partMeta.SegmentIDs { - delete(mt.segID2CollID, segID) - delete(mt.segID2PartitionID, segID) - delete(mt.flushedSegID, segID) - _, ok := mt.segID2IndexMeta[segID] - if !ok { - log.Warn("segment id not exist", zap.Int64("segment id", segID)) - continue - } - delete(mt.segID2IndexMeta, segID) - } + delete(mt.segID2IndexMeta, segID) } for _, idxInfo := range collMeta.FieldIndexes { _, ok := mt.indexID2Meta[idxInfo.IndexID] @@ -344,7 +281,6 @@ func (mt *metaTable) DeleteCollection(collID typeutil.UniqueID, ddOpStr func(ts delMetakeys := []string{ fmt.Sprintf("%s/%d", CollectionMetaPrefix, collID), - fmt.Sprintf("%s/%d", PartitionMetaPrefix, collID), fmt.Sprintf("%s/%d", SegmentIndexMetaPrefix, collID), fmt.Sprintf("%s/%d", IndexMetaPrefix, collID), } @@ -432,22 +368,6 @@ func (mt *metaTable) GetCollectionByName(collectionName string, ts typeutil.Time return nil, fmt.Errorf("can't find collection: %s, at timestamp = %d", collectionName, ts) } -func (mt *metaTable) GetCollectionBySegmentID(segID typeutil.UniqueID) (*pb.CollectionInfo, error) { - mt.ddLock.RLock() - defer mt.ddLock.RUnlock() - - vid, ok := mt.segID2CollID[segID] - if !ok { - return nil, fmt.Errorf("segment id %d not belong to any collection", segID) - } - col, ok := mt.collID2Meta[vid] - if !ok { - return nil, fmt.Errorf("can't find collection id: %d", vid) - } - colCopy := proto.Clone(&col) - return colCopy.(*pb.CollectionInfo), nil -} - func (mt *metaTable) ListCollections(ts typeutil.Timestamp) (map[string]typeutil.UniqueID, error) { mt.ddLock.RLock() defer mt.ddLock.RUnlock() @@ -511,34 +431,27 @@ func (mt *metaTable) AddPartition(collID typeutil.UniqueID, partitionName string if int64(len(coll.PartitionIDs)) >= Params.MaxPartitionNum { return 0, fmt.Errorf("maximum partition's number should be limit to %d", Params.MaxPartitionNum) } - for _, t := range coll.PartitionIDs { - part, ok := mt.partitionID2Meta[t] - if !ok { - log.Warn("partition id not exist", zap.Int64("partition id", t)) - continue - } - if part.PartitionName == partitionName { - return 0, fmt.Errorf("partition name = %s already exists", partitionName) - } - if part.PartitionID == partitionID { + + if len(coll.PartitionIDs) != len(coll.PartitonNames) { + return 0, fmt.Errorf("len(coll.PartitionIDs)=%d, len(coll.PartitonNames)=%d", len(coll.PartitionIDs), len(coll.PartitonNames)) + } + + for idx := range coll.PartitionIDs { + if coll.PartitionIDs[idx] == partitionID { return 0, fmt.Errorf("partition id = %d already exists", partitionID) } - } - partMeta := pb.PartitionInfo{ - PartitionName: partitionName, - PartitionID: partitionID, - SegmentIDs: make([]typeutil.UniqueID, 0, 16), + if coll.PartitonNames[idx] == partitionName { + return 0, fmt.Errorf("partition name = %s already exists", partitionName) + } + } coll.PartitionIDs = append(coll.PartitionIDs, partitionID) - mt.partitionID2Meta[partitionID] = partMeta + coll.PartitonNames = append(coll.PartitonNames, partitionName) mt.collID2Meta[collID] = coll - mt.partitionID2CollID[partitionID] = collID k1 := fmt.Sprintf("%s/%d", CollectionMetaPrefix, collID) v1 := proto.MarshalTextString(&coll) - k2 := fmt.Sprintf("%s/%d/%d", PartitionMetaPrefix, collID, partitionID) - v2 := proto.MarshalTextString(&partMeta) - meta := map[string]string{k1: v1, k2: v2} + meta := map[string]string{k1: v1} // save ddOpStr into etcd addition := mt.getAdditionKV(ddOpStr, meta) @@ -551,51 +464,71 @@ func (mt *metaTable) AddPartition(collID typeutil.UniqueID, partitionName string return ts, nil } -func (mt *metaTable) getPartitionByName(collID typeutil.UniqueID, partitionName string, ts typeutil.Timestamp) (pb.PartitionInfo, error) { +func (mt *metaTable) GetPartitionNameByID(collID, partitionID typeutil.UniqueID, ts typeutil.Timestamp) (string, error) { if ts == 0 { + mt.ddLock.RLock() + defer mt.ddLock.RUnlock() collMeta, ok := mt.collID2Meta[collID] if !ok { - return pb.PartitionInfo{}, fmt.Errorf("can't find collection id = %d", collID) + return "", fmt.Errorf("can't find collection id = %d", collID) } - for _, id := range collMeta.PartitionIDs { - partMeta, ok := mt.partitionID2Meta[id] - if ok && partMeta.PartitionName == partitionName { - return partMeta, nil + for idx := range collMeta.PartitionIDs { + if collMeta.PartitionIDs[idx] == partitionID { + return collMeta.PartitonNames[idx], nil } } - return pb.PartitionInfo{}, fmt.Errorf("partition %s does not exist", partitionName) + return "", fmt.Errorf("partition %d does not exist", partitionID) } collKey := fmt.Sprintf("%s/%d", CollectionMetaPrefix, collID) collVal, err := mt.client.Load(collKey, ts) if err != nil { - return pb.PartitionInfo{}, err + return "", err } - collMeta := pb.CollectionMeta{} + collMeta := pb.CollectionInfo{} err = proto.UnmarshalText(collVal, &collMeta) if err != nil { - return pb.PartitionInfo{}, err + return "", err } - for _, id := range collMeta.PartitionIDs { - partKey := fmt.Sprintf("%s/%d/%d", PartitionMetaPrefix, collID, id) - partVal, err := mt.client.Load(partKey, ts) - if err != nil { - log.Debug("load partition meta failed", zap.String("collection name", collMeta.Schema.Name), zap.Int64("partition id", id)) - continue - } - partMeta := pb.PartitionInfo{} - err = proto.UnmarshalText(partVal, &partMeta) - if err != nil { - log.Debug("unmarshal partition meta failed", zap.Error(err)) - continue - } - if partMeta.PartitionName == partitionName { - return partMeta, nil + for idx := range collMeta.PartitionIDs { + if collMeta.PartitionIDs[idx] == partitionID { + return collMeta.PartitonNames[idx], nil } } - return pb.PartitionInfo{}, fmt.Errorf("partition %s does not exist", partitionName) + return "", fmt.Errorf("partition %d does not exist", partitionID) } -func (mt *metaTable) GetPartitionByName(collID typeutil.UniqueID, partitionName string, ts typeutil.Timestamp) (pb.PartitionInfo, error) { +func (mt *metaTable) getPartitionByName(collID typeutil.UniqueID, partitionName string, ts typeutil.Timestamp) (typeutil.UniqueID, error) { + if ts == 0 { + collMeta, ok := mt.collID2Meta[collID] + if !ok { + return 0, fmt.Errorf("can't find collection id = %d", collID) + } + for idx := range collMeta.PartitionIDs { + if collMeta.PartitonNames[idx] == partitionName { + return collMeta.PartitionIDs[idx], nil + } + } + return 0, fmt.Errorf("partition %s does not exist", partitionName) + } + collKey := fmt.Sprintf("%s/%d", CollectionMetaPrefix, collID) + collVal, err := mt.client.Load(collKey, ts) + if err != nil { + return 0, err + } + collMeta := pb.CollectionInfo{} + err = proto.UnmarshalText(collVal, &collMeta) + if err != nil { + return 0, err + } + for idx := range collMeta.PartitionIDs { + if collMeta.PartitonNames[idx] == partitionName { + return collMeta.PartitionIDs[idx], nil + } + } + return 0, fmt.Errorf("partition %s does not exist", partitionName) +} + +func (mt *metaTable) GetPartitionByName(collID typeutil.UniqueID, partitionName string, ts typeutil.Timestamp) (typeutil.UniqueID, error) { mt.ddLock.RLock() defer mt.ddLock.RUnlock() return mt.getPartitionByName(collID, partitionName, ts) @@ -609,7 +542,7 @@ func (mt *metaTable) HasPartition(collID typeutil.UniqueID, partitionName string } //return timestamp, partitionid, error -func (mt *metaTable) DeletePartition(collID typeutil.UniqueID, partitionName string, ddOpStr func(ts typeutil.Timestamp) (string, error)) (typeutil.Timestamp, typeutil.UniqueID, error) { +func (mt *metaTable) DeletePartition(collID typeutil.UniqueID, partitionName string, segIDs []typeutil.UniqueID, ddOpStr func(ts typeutil.Timestamp) (string, error)) (typeutil.Timestamp, typeutil.UniqueID, error) { mt.ddLock.Lock() defer mt.ddLock.Unlock() @@ -626,30 +559,25 @@ func (mt *metaTable) DeletePartition(collID typeutil.UniqueID, partitionName str exist := false pd := make([]typeutil.UniqueID, 0, len(collMeta.PartitionIDs)) - var partMeta pb.PartitionInfo - for _, t := range collMeta.PartitionIDs { - pm, ok := mt.partitionID2Meta[t] - if ok { - if pm.PartitionName != partitionName { - pd = append(pd, pm.PartitionID) - } else { - partMeta = pm - exist = true - } + pn := make([]string, 0, len(collMeta.PartitonNames)) + var partID typeutil.UniqueID + for idx := range collMeta.PartitionIDs { + if collMeta.PartitonNames[idx] == partitionName { + partID = collMeta.PartitionIDs[idx] + exist = true + } else { + pd = append(pd, collMeta.PartitionIDs[idx]) + pn = append(pn, collMeta.PartitonNames[idx]) } } if !exist { return 0, 0, fmt.Errorf("partition %s does not exist", partitionName) } - delete(mt.partitionID2Meta, partMeta.PartitionID) collMeta.PartitionIDs = pd + collMeta.PartitonNames = pn mt.collID2Meta[collID] = collMeta - for _, segID := range partMeta.SegmentIDs { - delete(mt.segID2CollID, segID) - delete(mt.segID2PartitionID, segID) - delete(mt.flushedSegID, segID) - + for _, segID := range segIDs { _, ok := mt.segID2IndexMeta[segID] if !ok { log.Warn("segment has no index meta", zap.Int64("segment id", segID)) @@ -658,11 +586,9 @@ func (mt *metaTable) DeletePartition(collID typeutil.UniqueID, partitionName str delete(mt.segID2IndexMeta, segID) } meta := map[string]string{path.Join(CollectionMetaPrefix, strconv.FormatInt(collID, 10)): proto.MarshalTextString(&collMeta)} - delMetaKeys := []string{ - fmt.Sprintf("%s/%d/%d", PartitionMetaPrefix, collMeta.ID, partMeta.PartitionID), - } + delMetaKeys := []string{} for _, idxInfo := range collMeta.FieldIndexes { - k := fmt.Sprintf("%s/%d/%d/%d", SegmentIndexMetaPrefix, collMeta.ID, idxInfo.IndexID, partMeta.PartitionID) + k := fmt.Sprintf("%s/%d/%d/%d", SegmentIndexMetaPrefix, collMeta.ID, idxInfo.IndexID, partID) delMetaKeys = append(delMetaKeys, k) } @@ -674,152 +600,50 @@ func (mt *metaTable) DeletePartition(collID typeutil.UniqueID, partitionName str _ = mt.reloadFromKV() return 0, 0, err } - return ts, partMeta.PartitionID, nil + return ts, partID, nil } -func (mt *metaTable) GetPartitionByID(collID typeutil.UniqueID, partitionID typeutil.UniqueID, ts typeutil.Timestamp) (pb.PartitionInfo, error) { - mt.ddLock.RLock() - defer mt.ddLock.RUnlock() - if ts == 0 { - partMeta, ok := mt.partitionID2Meta[partitionID] - if !ok { - return pb.PartitionInfo{}, fmt.Errorf("partition id = %d not exist", partitionID) - } - return partMeta, nil - } - partKey := fmt.Sprintf("%s/%d/%d", PartitionMetaPrefix, collID, partitionID) - partVal, err := mt.client.Load(partKey, ts) - if err != nil { - return pb.PartitionInfo{}, err - } - partInfo := pb.PartitionInfo{} - err = proto.UnmarshalText(partVal, &partInfo) - if err != nil { - return pb.PartitionInfo{}, err - } - return partInfo, nil - -} - -func (mt *metaTable) AddSegment(segInfos []*datapb.SegmentInfo, msgStartPos string, msgEndPos string) (typeutil.Timestamp, error) { +func (mt *metaTable) AddIndex(segIdxInfo *pb.SegmentIndexInfo, collID, partID typeutil.UniqueID) (typeutil.Timestamp, error) { mt.ddLock.Lock() defer mt.ddLock.Unlock() - meta := make(map[string]string) - for _, segInfo := range segInfos { - collMeta, ok := mt.collID2Meta[segInfo.CollectionID] - if !ok { - return 0, fmt.Errorf("can't find collection id = %d", segInfo.CollectionID) + collMeta, ok := mt.collID2Meta[collID] + if !ok { + return 0, fmt.Errorf("collection id = %d not found", collID) + } + exist := false + for _, fidx := range collMeta.FieldIndexes { + if fidx.IndexID == segIdxInfo.IndexID { + exist = true + break } - partMeta, ok := mt.partitionID2Meta[segInfo.PartitionID] - if !ok { - return 0, fmt.Errorf("can't find partition id = %d", segInfo.PartitionID) - } - exist := false - for _, partID := range collMeta.PartitionIDs { - if partID == segInfo.PartitionID { - exist = true - break - } - } - if !exist { - return 0, fmt.Errorf("partition id = %d, not belong to collection id = %d", segInfo.PartitionID, segInfo.CollectionID) - } - exist = false - for _, segID := range partMeta.SegmentIDs { - if segID == segInfo.ID { - exist = true - } - } - if exist { - return 0, fmt.Errorf("segment id = %d exist", segInfo.ID) - } - partMeta.SegmentIDs = append(partMeta.SegmentIDs, segInfo.ID) - mt.partitionID2Meta[segInfo.PartitionID] = partMeta - mt.segID2CollID[segInfo.ID] = segInfo.CollectionID - mt.segID2PartitionID[segInfo.ID] = segInfo.PartitionID - - k := fmt.Sprintf("%s/%d/%d", PartitionMetaPrefix, segInfo.CollectionID, segInfo.PartitionID) - v := proto.MarshalTextString(&partMeta) - meta[k] = v + } + if !exist { + return 0, fmt.Errorf("index id = %d not found", segIdxInfo.IndexID) } - // AddSegment is invoked from DataCoord - if msgStartPos != "" && msgEndPos != "" { - meta[SegInfoMsgStartPosPrefix] = msgStartPos - meta[SegInfoMsgEndPosPrefix] = msgEndPos - } - - ts, err := mt.client.MultiSave(meta, nil) - if err != nil { - _ = mt.reloadFromKV() - return 0, err - } - return ts, nil -} - -func (mt *metaTable) AddIndex(segIdxInfos []*pb.SegmentIndexInfo, msgStartPos string, msgEndPos string) (typeutil.Timestamp, error) { - mt.ddLock.Lock() - defer mt.ddLock.Unlock() - - meta := make(map[string]string) - - for _, segIdxInfo := range segIdxInfos { - collID, ok := mt.segID2CollID[segIdxInfo.SegmentID] - if !ok { - return 0, fmt.Errorf("segment id = %d not belong to any collection", segIdxInfo.SegmentID) - } - collMeta, ok := mt.collID2Meta[collID] - if !ok { - return 0, fmt.Errorf("collection id = %d not found", collID) - } - partID, ok := mt.segID2PartitionID[segIdxInfo.SegmentID] - if !ok { - return 0, fmt.Errorf("segment id = %d not belong to any partition", segIdxInfo.SegmentID) - } - exist := false - for _, fidx := range collMeta.FieldIndexes { - if fidx.IndexID == segIdxInfo.IndexID { - exist = true - break - } - } - if !exist { - return 0, fmt.Errorf("index id = %d not found", segIdxInfo.IndexID) - } - - segIdxMap, ok := mt.segID2IndexMeta[segIdxInfo.SegmentID] - if !ok { - idxMap := map[typeutil.UniqueID]pb.SegmentIndexInfo{segIdxInfo.IndexID: *segIdxInfo} - mt.segID2IndexMeta[segIdxInfo.SegmentID] = &idxMap - } else { - tmpInfo, ok := (*segIdxMap)[segIdxInfo.IndexID] - if ok { - if SegmentIndexInfoEqual(segIdxInfo, &tmpInfo) { + segIdxMap, ok := mt.segID2IndexMeta[segIdxInfo.SegmentID] + if !ok { + idxMap := map[typeutil.UniqueID]pb.SegmentIndexInfo{segIdxInfo.IndexID: *segIdxInfo} + mt.segID2IndexMeta[segIdxInfo.SegmentID] = idxMap + } else { + tmpInfo, ok := segIdxMap[segIdxInfo.IndexID] + if ok { + if SegmentIndexInfoEqual(segIdxInfo, &tmpInfo) { + if segIdxInfo.BuildID == tmpInfo.BuildID { log.Debug("Identical SegmentIndexInfo already exist", zap.Int64("IndexID", segIdxInfo.IndexID)) - continue + return 0, nil } return 0, fmt.Errorf("index id = %d exist", segIdxInfo.IndexID) } } - - if _, ok := mt.flushedSegID[segIdxInfo.SegmentID]; !ok { - mt.flushedSegID[segIdxInfo.SegmentID] = true - } - - (*(mt.segID2IndexMeta[segIdxInfo.SegmentID]))[segIdxInfo.IndexID] = *segIdxInfo - k := fmt.Sprintf("%s/%d/%d/%d/%d", SegmentIndexMetaPrefix, collID, segIdxInfo.IndexID, partID, segIdxInfo.SegmentID) - v := proto.MarshalTextString(segIdxInfo) - meta[k] = v } - // AddIndex is invoked from DataNode flush operation - if msgStartPos != "" && msgEndPos != "" { - meta[FlushedSegMsgStartPosPrefix] = msgStartPos - meta[FlushedSegMsgEndPosPrefix] = msgEndPos - } + mt.segID2IndexMeta[segIdxInfo.SegmentID][segIdxInfo.IndexID] = *segIdxInfo + k := fmt.Sprintf("%s/%d/%d/%d/%d", SegmentIndexMetaPrefix, collID, segIdxInfo.IndexID, partID, segIdxInfo.SegmentID) + v := proto.MarshalTextString(segIdxInfo) - ts, err := mt.client.MultiSave(meta, nil) + ts, err := mt.client.Save(k, v) if err != nil { _ = mt.reloadFromKV() return 0, err @@ -829,7 +653,7 @@ func (mt *metaTable) AddIndex(segIdxInfos []*pb.SegmentIndexInfo, msgStartPos st } //return timestamp, index id, is dropped, error -func (mt *metaTable) DropIndex(collName, fieldName, indexName string) (typeutil.Timestamp, typeutil.UniqueID, bool, error) { +func (mt *metaTable) DropIndex(collName, fieldName, indexName string, segIDs []typeutil.UniqueID) (typeutil.Timestamp, typeutil.UniqueID, bool, error) { mt.ddLock.Lock() defer mt.ddLock.Unlock() @@ -876,19 +700,12 @@ func (mt *metaTable) DropIndex(collName, fieldName, indexName string) (typeutil. delete(mt.indexID2Meta, dropIdxID) - for _, partID := range collMeta.PartitionIDs { - partMeta, ok := mt.partitionID2Meta[partID] - if !ok { - log.Warn("partition not exist", zap.Int64("partition id", partID)) - continue - } - for _, segID := range partMeta.SegmentIDs { - segInfo, ok := mt.segID2IndexMeta[segID] + for _, segID := range segIDs { + segInfo, ok := mt.segID2IndexMeta[segID] + if ok { + _, ok := segInfo[dropIdxID] if ok { - _, ok := (*segInfo)[dropIdxID] - if ok { - delete(*segInfo, dropIdxID) - } + delete(segInfo, dropIdxID) } } } @@ -910,11 +727,6 @@ func (mt *metaTable) GetSegmentIndexInfoByID(segID typeutil.UniqueID, filedID in mt.ddLock.RLock() defer mt.ddLock.RUnlock() - _, ok := mt.flushedSegID[segID] - if !ok { - return pb.SegmentIndexInfo{}, fmt.Errorf("segment id %d hasn't flushed, there is no index meta", segID) - } - segIdxMap, ok := mt.segID2IndexMeta[segID] if !ok { return pb.SegmentIndexInfo{ @@ -925,19 +737,19 @@ func (mt *metaTable) GetSegmentIndexInfoByID(segID typeutil.UniqueID, filedID in EnableIndex: false, }, nil } - if len(*segIdxMap) == 0 { + if len(segIdxMap) == 0 { return pb.SegmentIndexInfo{}, fmt.Errorf("segment id %d not has any index", segID) } if filedID == -1 && idxName == "" { // return default index - for _, seg := range *segIdxMap { + for _, seg := range segIdxMap { info, ok := mt.indexID2Meta[seg.IndexID] if ok && info.IndexName == Params.DefaultIndexName { return seg, nil } } } else { - for idxID, seg := range *segIdxMap { + for idxID, seg := range segIdxMap { idxMeta, ok := mt.indexID2Meta[idxID] if ok { if idxMeta.IndexName != idxName { @@ -991,7 +803,7 @@ func (mt *metaTable) unlockIsSegmentIndexed(segID typeutil.UniqueID, fieldSchema return false } exist := false - for idxID, meta := range *segIdx { + for idxID, meta := range segIdx { if meta.FieldID != fieldSchema.FieldID { continue } @@ -1008,7 +820,7 @@ func (mt *metaTable) unlockIsSegmentIndexed(segID typeutil.UniqueID, fieldSchema } // return segment ids, type params, error -func (mt *metaTable) GetNotIndexedSegments(collName string, fieldName string, idxInfo *pb.IndexInfo) ([]typeutil.UniqueID, schemapb.FieldSchema, error) { +func (mt *metaTable) GetNotIndexedSegments(collName string, fieldName string, idxInfo *pb.IndexInfo, segIDs []typeutil.UniqueID) ([]typeutil.UniqueID, schemapb.FieldSchema, error) { mt.ddLock.Lock() defer mt.ddLock.Unlock() @@ -1108,14 +920,9 @@ func (mt *metaTable) GetNotIndexedSegments(collName string, fieldName string, id } rstID := make([]typeutil.UniqueID, 0, 16) - for _, partID := range collMeta.PartitionIDs { - partMeta, ok := mt.partitionID2Meta[partID] - if ok { - for _, segID := range partMeta.SegmentIDs { - if exist := mt.unlockIsSegmentIndexed(segID, &fieldSchema, idxInfo.IndexParams); !exist { - rstID = append(rstID, segID) - } - } + for _, segID := range segIDs { + if exist := mt.unlockIsSegmentIndexed(segID, &fieldSchema, idxInfo.IndexParams); !exist { + rstID = append(rstID, segID) } } return rstID, fieldSchema, nil @@ -1157,15 +964,3 @@ func (mt *metaTable) GetIndexByID(indexID typeutil.UniqueID) (*pb.IndexInfo, err } return &indexInfo, nil } - -func (mt *metaTable) AddFlushedSegment(segID typeutil.UniqueID) error { - mt.ddLock.Lock() - defer mt.ddLock.Unlock() - - _, ok := mt.flushedSegID[segID] - if ok { - return fmt.Errorf("segment id = %d exist", segID) - } - mt.flushedSegID[segID] = true - return nil -} diff --git a/internal/rootcoord/meta_table_test.go b/internal/rootcoord/meta_table_test.go index cca29a64cd..1996df492b 100644 --- a/internal/rootcoord/meta_table_test.go +++ b/internal/rootcoord/meta_table_test.go @@ -8,7 +8,6 @@ // Unless required by applicable law or agreed to in writing, software distributed under the License // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License. - package rootcoord import ( @@ -20,7 +19,6 @@ import ( "github.com/golang/protobuf/proto" "github.com/milvus-io/milvus/internal/kv" "github.com/milvus-io/milvus/internal/proto/commonpb" - "github.com/milvus-io/milvus/internal/proto/datapb" pb "github.com/milvus-io/milvus/internal/proto/etcdpb" "github.com/milvus-io/milvus/internal/proto/schemapb" "github.com/milvus-io/milvus/internal/util/typeutil" @@ -97,15 +95,6 @@ func Test_MockKV(t *testing.T) { _, err = NewMetaTable(k1) assert.NotNil(t, err) - prefix[PartitionMetaPrefix] = []string{"partition-meta"} - _, err = NewMetaTable(k1) - assert.NotNil(t, err) - assert.EqualError(t, err, "RootCoord UnmarshalText pb.PartitionInfo err:line 1.0: unknown field name \"partition-meta\" in milvus.proto.etcd.PartitionInfo") - - prefix[PartitionMetaPrefix] = []string{proto.MarshalTextString(&pb.PartitionInfo{})} - _, err = NewMetaTable(k1) - assert.NotNil(t, err) - prefix[SegmentIndexMetaPrefix] = []string{"segment-index-meta"} _, err = NewMetaTable(k1) assert.NotNil(t, err) @@ -147,9 +136,11 @@ func Test_MockKV(t *testing.T) { func TestMetaTable(t *testing.T) { const ( collID = typeutil.UniqueID(1) + collName = "testColl" collIDInvalid = typeutil.UniqueID(2) partIDDefault = typeutil.UniqueID(10) partID = typeutil.UniqueID(20) + partName = "testPart" partIDInvalid = typeutil.UniqueID(21) segID = typeutil.UniqueID(100) segID2 = typeutil.UniqueID(101) @@ -222,18 +213,9 @@ func TestMetaTable(t *testing.T) { IndexID: indexID, }, }, - CreateTime: 0, - PartitionIDs: nil, - } - partInfoDefault := &pb.PartitionInfo{ - PartitionName: "_default", - PartitionID: partIDDefault, - SegmentIDs: nil, - } - partInfo := &pb.PartitionInfo{ - PartitionName: "testPart", - PartitionID: partID, - SegmentIDs: nil, + CreateTime: 0, + PartitionIDs: nil, + PartitonNames: nil, } idxInfo := []*pb.IndexInfo{ { @@ -257,20 +239,15 @@ func TestMetaTable(t *testing.T) { } t.Run("add collection", func(t *testing.T) { - partInfoDefault.SegmentIDs = []int64{segID} - _, err = mt.AddCollection(collInfo, partInfoDefault, idxInfo, ddOp) - assert.NotNil(t, err) - partInfoDefault.SegmentIDs = []int64{} - collInfo.PartitionIDs = []int64{segID} - _, err = mt.AddCollection(collInfo, partInfoDefault, idxInfo, ddOp) + _, err = mt.AddCollection(collInfo, partIDDefault, Params.DefaultPartitionName, idxInfo, ddOp) assert.NotNil(t, err) collInfo.PartitionIDs = []int64{} - _, err = mt.AddCollection(collInfo, partInfoDefault, nil, ddOp) + _, err = mt.AddCollection(collInfo, partIDDefault, Params.DefaultPartitionName, nil, ddOp) assert.NotNil(t, err) - _, err = mt.AddCollection(collInfo, partInfoDefault, idxInfo, ddOp) + _, err = mt.AddCollection(collInfo, partIDDefault, Params.DefaultPartitionName, idxInfo, ddOp) assert.Nil(t, err) collMeta, err := mt.GetCollectionByName("testColl", 0) @@ -290,7 +267,7 @@ func TestMetaTable(t *testing.T) { }) t.Run("add partition", func(t *testing.T) { - _, err := mt.AddPartition(collID, partInfo.PartitionName, partInfo.PartitionID, ddOp) + _, err := mt.AddPartition(collID, partName, partID, ddOp) assert.Nil(t, err) // check DD operation flag @@ -299,33 +276,6 @@ func TestMetaTable(t *testing.T) { assert.Equal(t, "false", flag) }) - t.Run("add segment", func(t *testing.T) { - segInfo := &datapb.SegmentInfo{ - ID: segID, - CollectionID: collID, - PartitionID: partID, - } - _, err := mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.Nil(t, err) - - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.NotNil(t, err) - - segInfo.ID = segID2 - segInfo.CollectionID = collIDInvalid - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.NotNil(t, err) - - segInfo.CollectionID = collID - segInfo.PartitionID = partIDInvalid - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.NotNil(t, err) - - segInfo.PartitionID = partID - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.Nil(t, err) - }) - t.Run("add segment index", func(t *testing.T) { segIdxInfo := pb.SegmentIndexInfo{ SegmentID: segID, @@ -333,15 +283,15 @@ func TestMetaTable(t *testing.T) { IndexID: indexID, BuildID: buildID, } - _, err := mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") + _, err := mt.AddIndex(&segIdxInfo, collID, partID) assert.Nil(t, err) // it's legal to add index twice - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") + _, err = mt.AddIndex(&segIdxInfo, collID, partID) assert.Nil(t, err) segIdxInfo.BuildID = 202 - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") + _, err = mt.AddIndex(&segIdxInfo, collID, partID) assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("index id = %d exist", segIdxInfo.IndexID)) }) @@ -374,9 +324,9 @@ func TestMetaTable(t *testing.T) { IndexParams: params, } - _, _, err := mt.GetNotIndexedSegments("collTest", "field110", idxInfo) + _, _, err := mt.GetNotIndexedSegments("collTest", "field110", idxInfo, nil) assert.NotNil(t, err) - seg, field, err := mt.GetNotIndexedSegments("testColl", "field110", idxInfo) + seg, field, err := mt.GetNotIndexedSegments("testColl", "field110", idxInfo, []typeutil.UniqueID{segID, segID2}) assert.Nil(t, err) assert.Equal(t, 1, len(seg)) assert.Equal(t, segID2, seg[0]) @@ -392,7 +342,7 @@ func TestMetaTable(t *testing.T) { idxInfo.IndexID = 2001 idxInfo.IndexName = "field110-1" - seg, field, err = mt.GetNotIndexedSegments("testColl", "field110", idxInfo) + seg, field, err = mt.GetNotIndexedSegments("testColl", "field110", idxInfo, []typeutil.UniqueID{segID, segID2}) assert.Nil(t, err) assert.Equal(t, 2, len(seg)) assert.Equal(t, segID, seg[0]) @@ -440,12 +390,12 @@ func TestMetaTable(t *testing.T) { }) t.Run("drop index", func(t *testing.T) { - _, idx, ok, err := mt.DropIndex("testColl", "field110", "field110") + _, idx, ok, err := mt.DropIndex("testColl", "field110", "field110", nil) assert.Nil(t, err) assert.True(t, ok) assert.Equal(t, indexID, idx) - _, _, ok, err = mt.DropIndex("testColl", "field110", "field110-error") + _, _, ok, err = mt.DropIndex("testColl", "field110", "field110-error", nil) assert.Nil(t, err) assert.False(t, ok) @@ -463,7 +413,7 @@ func TestMetaTable(t *testing.T) { }) t.Run("drop partition", func(t *testing.T) { - _, id, err := mt.DeletePartition(collID, partInfo.PartitionName, nil) + _, id, err := mt.DeletePartition(collID, partName, nil, nil) assert.Nil(t, err) assert.Equal(t, partID, id) @@ -474,9 +424,9 @@ func TestMetaTable(t *testing.T) { }) t.Run("drop collection", func(t *testing.T) { - _, err = mt.DeleteCollection(collIDInvalid, nil) + _, err = mt.DeleteCollection(collIDInvalid, nil, nil) assert.NotNil(t, err) - _, err = mt.DeleteCollection(collID, nil) + _, err = mt.DeleteCollection(collID, nil, nil) assert.Nil(t, err) // check DD operation flag @@ -497,7 +447,8 @@ func TestMetaTable(t *testing.T) { return 0, fmt.Errorf("multi save error") } collInfo.PartitionIDs = nil - _, err := mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err := mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.NotNil(t, err) assert.EqualError(t, err, "multi save error") }) @@ -510,11 +461,11 @@ func TestMetaTable(t *testing.T) { return 0, fmt.Errorf("milti save and remove with prefix error") } collInfo.PartitionIDs = nil - _, err := mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err := mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - mt.partitionID2Meta = make(map[typeutil.UniqueID]pb.PartitionInfo) mt.indexID2Meta = make(map[int64]pb.IndexInfo) - _, err = mt.DeleteCollection(collInfo.ID, nil) + _, err = mt.DeleteCollection(collInfo.ID, nil, nil) assert.NotNil(t, err) assert.EqualError(t, err, "milti save and remove with prefix error") }) @@ -525,15 +476,8 @@ func TestMetaTable(t *testing.T) { } collInfo.PartitionIDs = nil - _, err := mt.AddCollection(collInfo, partInfo, idxInfo, nil) - assert.Nil(t, err) - - segInfo := &datapb.SegmentInfo{ - ID: 100, - CollectionID: collID, - PartitionID: partID, - } - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") + collInfo.PartitonNames = nil + _, err := mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) mt.collID2Meta = make(map[int64]pb.CollectionInfo) @@ -541,14 +485,6 @@ func TestMetaTable(t *testing.T) { assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("can't find collection: %s", collInfo.Schema.Name)) - _, err = mt.GetCollectionBySegmentID(segInfo.ID) - assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("can't find collection id: %d", collInfo.ID)) - - mt.segID2CollID = make(map[int64]int64) - _, err = mt.GetCollectionBySegmentID(segInfo.ID) - assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("segment id %d not belong to any collection", segInfo.ID)) }) t.Run("add partition failed", func(t *testing.T) { @@ -562,7 +498,8 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) _, err = mt.AddPartition(2, "no-part", 22, nil) @@ -576,9 +513,9 @@ func TestMetaTable(t *testing.T) { assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("maximum partition's number should be limit to %d", Params.MaxPartitionNum)) - coll.PartitionIDs = []int64{partInfo.PartitionID} + coll.PartitionIDs = []int64{partID} + coll.PartitonNames = []string{partName} mt.collID2Meta[coll.ID] = coll - mt.partitionID2Meta = make(map[int64]pb.PartitionInfo) mockKV.multiSave = func(kvs map[string]string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { return 0, fmt.Errorf("multi save error") } @@ -590,15 +527,16 @@ func TestMetaTable(t *testing.T) { return 0, nil } collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - _, err = mt.AddPartition(coll.ID, partInfo.PartitionName, 22, nil) + _, err = mt.AddPartition(coll.ID, partName, 22, nil) assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("partition name = %s already exists", partInfo.PartitionName)) + assert.EqualError(t, err, fmt.Sprintf("partition name = %s already exists", partName)) - _, err = mt.AddPartition(coll.ID, "no-part", partInfo.PartitionID, nil) + _, err = mt.AddPartition(coll.ID, "no-part", partID, nil) assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("partition id = %d already exists", partInfo.PartitionID)) + assert.EqualError(t, err, fmt.Sprintf("partition id = %d already exists", partID)) }) t.Run("has partition failed", func(t *testing.T) { @@ -612,14 +550,14 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - mt.partitionID2Meta = make(map[int64]pb.PartitionInfo) - assert.False(t, mt.HasPartition(collInfo.ID, partInfo.PartitionName, 0)) + assert.False(t, mt.HasPartition(collInfo.ID, "no-partName", 0)) mt.collID2Meta = make(map[int64]pb.CollectionInfo) - assert.False(t, mt.HasPartition(collInfo.ID, partInfo.PartitionName, 0)) + assert.False(t, mt.HasPartition(collInfo.ID, partName, 0)) }) t.Run("delete partition failed", func(t *testing.T) { @@ -633,78 +571,29 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - _, _, err = mt.DeletePartition(collInfo.ID, Params.DefaultPartitionName, nil) + _, _, err = mt.DeletePartition(collInfo.ID, Params.DefaultPartitionName, nil, nil) assert.NotNil(t, err) assert.EqualError(t, err, "default partition cannot be deleted") - _, _, err = mt.DeletePartition(collInfo.ID, "abc", nil) + _, _, err = mt.DeletePartition(collInfo.ID, "abc", nil, nil) assert.NotNil(t, err) assert.EqualError(t, err, "partition abc does not exist") - pm := mt.partitionID2Meta[partInfo.PartitionID] - pm.SegmentIDs = []int64{11, 12, 13} - mt.partitionID2Meta[pm.PartitionID] = pm mockKV.multiSaveAndRemoveWithPrefix = func(saves map[string]string, removals []string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { return 0, fmt.Errorf("multi save and remove with prefix error") } - _, _, err = mt.DeletePartition(collInfo.ID, pm.PartitionName, nil) + _, _, err = mt.DeletePartition(collInfo.ID, partName, nil, nil) assert.NotNil(t, err) assert.EqualError(t, err, "multi save and remove with prefix error") mt.collID2Meta = make(map[int64]pb.CollectionInfo) - _, _, err = mt.DeletePartition(collInfo.ID, "abc", nil) + _, _, err = mt.DeletePartition(collInfo.ID, "abc", nil, nil) assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("can't find collection id = %d", collInfo.ID)) - - _, err = mt.GetPartitionByID(1, 11, 0) - assert.NotNil(t, err) - assert.EqualError(t, err, "partition id = 11 not exist") - }) - - t.Run("add segment failed", func(t *testing.T) { - mockKV.loadWithPrefix = func(key string, ts typeutil.Timestamp) ([]string, []string, error) { - return nil, nil, nil - } - mockKV.multiSave = func(kvs map[string]string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { - return 0, nil - } - err := mt.reloadFromKV() - assert.Nil(t, err) - - collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) - assert.Nil(t, err) - - noPart := pb.PartitionInfo{ - PartitionName: "no-part", - PartitionID: partInfo.PartitionID + 1, - SegmentIDs: nil, - } - mt.partitionID2Meta[noPart.PartitionID] = noPart - - segInfo := &datapb.SegmentInfo{ - ID: 100, - CollectionID: collInfo.ID, - PartitionID: noPart.PartitionID, - } - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("partition id = %d, not belong to collection id = %d", segInfo.PartitionID, segInfo.CollectionID)) - - segInfo = &datapb.SegmentInfo{ - ID: 11, - CollectionID: collInfo.ID, - PartitionID: partInfo.PartitionID, - } - mockKV.multiSave = func(kvs map[string]string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { - return 0, fmt.Errorf("save error") - } - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.NotNil(t, err) - assert.EqualError(t, err, "save error") }) t.Run("add index failed", func(t *testing.T) { @@ -721,15 +610,8 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) - assert.Nil(t, err) - - segInfo := &datapb.SegmentInfo{ - ID: 100, - CollectionID: collID, - PartitionID: partID, - } - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) segIdxInfo := pb.SegmentIndexInfo{ @@ -738,39 +620,28 @@ func TestMetaTable(t *testing.T) { IndexID: indexID2, BuildID: buildID, } - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") + _, err = mt.AddIndex(&segIdxInfo, collID, partID) assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("index id = %d not found", segIdxInfo.IndexID)) - mt.segID2PartitionID = make(map[int64]int64) - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") - assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("segment id = %d not belong to any partition", segIdxInfo.SegmentID)) - mt.collID2Meta = make(map[int64]pb.CollectionInfo) - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") + _, err = mt.AddIndex(&segIdxInfo, collID, partID) assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("collection id = %d not found", collInfo.ID)) - mt.segID2CollID = make(map[int64]int64) - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") - assert.NotNil(t, err) - assert.EqualError(t, err, fmt.Sprintf("segment id = %d not belong to any collection", segIdxInfo.SegmentID)) - err = mt.reloadFromKV() assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) - assert.Nil(t, err) - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) segIdxInfo.IndexID = indexID - mockKV.multiSave = func(kvs map[string]string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { + mockKV.save = func(key, value string) (typeutil.Timestamp, error) { return 0, fmt.Errorf("save error") } - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") + _, err = mt.AddIndex(&segIdxInfo, collID, partID) assert.NotNil(t, err) assert.EqualError(t, err, "save error") }) @@ -789,19 +660,20 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - _, _, _, err = mt.DropIndex("abc", "abc", "abc") + _, _, _, err = mt.DropIndex("abc", "abc", "abc", nil) assert.NotNil(t, err) assert.EqualError(t, err, "collection name = abc not exist") mt.collName2ID["abc"] = 2 - _, _, _, err = mt.DropIndex("abc", "abc", "abc") + _, _, _, err = mt.DropIndex("abc", "abc", "abc", nil) assert.NotNil(t, err) assert.EqualError(t, err, "collection name = abc not has meta") - _, _, _, err = mt.DropIndex(collInfo.Schema.Name, "abc", "abc") + _, _, _, err = mt.DropIndex(collInfo.Schema.Name, "abc", "abc", nil) assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("collection %s doesn't have filed abc", collInfo.Schema.Name)) @@ -818,7 +690,7 @@ func TestMetaTable(t *testing.T) { } mt.collID2Meta[coll.ID] = coll mt.indexID2Meta = make(map[int64]pb.IndexInfo) - _, idxID, isDroped, err := mt.DropIndex(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idxInfo[0].IndexName) + _, idxID, isDroped, err := mt.DropIndex(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idxInfo[0].IndexName, nil) assert.Zero(t, idxID) assert.False(t, isDroped) assert.Nil(t, err) @@ -826,13 +698,13 @@ func TestMetaTable(t *testing.T) { err = mt.reloadFromKV() assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - mt.partitionID2Meta = make(map[int64]pb.PartitionInfo) mockKV.multiSaveAndRemoveWithPrefix = func(saves map[string]string, removals []string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { return 0, fmt.Errorf("multi save and remove with prefix error") } - _, _, _, err = mt.DropIndex(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idxInfo[0].IndexName) + _, _, _, err = mt.DropIndex(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idxInfo[0].IndexName, nil) assert.NotNil(t, err) assert.EqualError(t, err, "multi save and remove with prefix error") }) @@ -851,35 +723,23 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - _, err = mt.GetSegmentIndexInfoByID(segID2, fieldID, "abc") - assert.NotNil(t, err) - assert.EqualError(t, err, "segment id 101 hasn't flushed, there is no index meta") - - err = mt.AddFlushedSegment(segID2) - assert.Nil(t, err) seg, err := mt.GetSegmentIndexInfoByID(segID2, fieldID, "abc") assert.Nil(t, err) assert.Equal(t, segID2, seg.SegmentID) assert.Equal(t, fieldID, seg.FieldID) assert.Equal(t, false, seg.EnableIndex) - segInfo := &datapb.SegmentInfo{ - ID: 100, - CollectionID: collID, - PartitionID: partID, - } - _, err = mt.AddSegment([]*datapb.SegmentInfo{segInfo}, "", "") - assert.Nil(t, err) segIdxInfo := pb.SegmentIndexInfo{ SegmentID: segID, FieldID: fieldID, IndexID: indexID, BuildID: buildID, } - _, err = mt.AddIndex([]*pb.SegmentIndexInfo{&segIdxInfo}, "", "") + _, err = mt.AddIndex(&segIdxInfo, collID, partID) assert.Nil(t, err) idx, err := mt.GetSegmentIndexInfoByID(segIdxInfo.SegmentID, segIdxInfo.FieldID, idxInfo[0].IndexName) assert.Nil(t, err) @@ -908,7 +768,8 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) mt.collID2Meta = make(map[int64]pb.CollectionInfo) @@ -935,8 +796,6 @@ func TestMetaTable(t *testing.T) { } idxMeta := make(map[int64]pb.SegmentIndexInfo) idxMeta[idx.IndexID] = *idx - mt.segID2IndexMeta = make(map[int64]*map[int64]pb.SegmentIndexInfo) - mt.segID2IndexMeta[idx.SegmentID] = &idxMeta field := schemapb.FieldSchema{ FieldID: 31, @@ -965,7 +824,7 @@ func TestMetaTable(t *testing.T) { } mt.collName2ID["abc"] = 123 - _, _, err = mt.GetNotIndexedSegments("abc", "no-field", idx) + _, _, err = mt.GetNotIndexedSegments("abc", "no-field", idx, nil) assert.NotNil(t, err) assert.EqualError(t, err, "collection abc not found") @@ -979,16 +838,17 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) - _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, "no-field", idx) + _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, "no-field", idx, nil) assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("collection %s doesn't have filed no-field", collInfo.Schema.Name)) bakMeta := mt.indexID2Meta mt.indexID2Meta = make(map[int64]pb.IndexInfo) - _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idx) + _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idx, nil) assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("index id = %d not found", idxInfo[0].IndexID)) mt.indexID2Meta = bakMeta @@ -996,7 +856,7 @@ func TestMetaTable(t *testing.T) { mockKV.multiSave = func(kvs map[string]string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { return 0, fmt.Errorf("multi save error") } - _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idx) + _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idx, nil) assert.NotNil(t, err) assert.EqualError(t, err, "multi save error") @@ -1004,7 +864,8 @@ func TestMetaTable(t *testing.T) { return 0, nil } collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) coll := mt.collID2Meta[collInfo.ID] coll.FieldIndexes = append(coll.FieldIndexes, &pb.FieldIndexInfo{FiledID: coll.FieldIndexes[0].FiledID, IndexID: coll.FieldIndexes[0].IndexID + 1}) @@ -1025,7 +886,7 @@ func TestMetaTable(t *testing.T) { mockKV.multiSave = func(kvs map[string]string, addition func(ts typeutil.Timestamp) (string, string, error)) (typeutil.Timestamp, error) { return 0, fmt.Errorf("multi save error") } - _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idx) + _, _, err = mt.GetNotIndexedSegments(collInfo.Schema.Name, collInfo.Schema.Fields[0].Name, idx, nil) assert.NotNil(t, err) assert.EqualError(t, err, "multi save error") }) @@ -1052,7 +913,8 @@ func TestMetaTable(t *testing.T) { assert.Nil(t, err) collInfo.PartitionIDs = nil - _, err = mt.AddCollection(collInfo, partInfo, idxInfo, nil) + collInfo.PartitonNames = nil + _, err = mt.AddCollection(collInfo, partID, partName, idxInfo, nil) assert.Nil(t, err) mt.indexID2Meta = make(map[int64]pb.IndexInfo) _, _, err = mt.GetIndexByName(collInfo.Schema.Name, idxInfo[0].IndexName) @@ -1063,19 +925,6 @@ func TestMetaTable(t *testing.T) { assert.NotNil(t, err) assert.EqualError(t, err, fmt.Sprintf("cannot find index, id = %d", idxInfo[0].IndexID)) }) - - t.Run("add flused segment failed", func(t *testing.T) { - mockKV.loadWithPrefix = func(key string, ts typeutil.Timestamp) ([]string, []string, error) { - return nil, nil, nil - } - err := mt.reloadFromKV() - assert.Nil(t, err) - err = mt.AddFlushedSegment(222) - assert.Nil(t, err) - err = mt.AddFlushedSegment(222) - assert.NotNil(t, err) - assert.EqualError(t, err, "segment id = 222 exist") - }) } func TestMetaWithTimestamp(t *testing.T) { @@ -1108,21 +957,15 @@ func TestMetaWithTimestamp(t *testing.T) { }, } - partInfo := &pb.PartitionInfo{ - PartitionName: "p1", - PartitionID: 11, - SegmentIDs: nil, - } - t1, err := mt.AddCollection(collInfo, partInfo, nil, nil) + t1, err := mt.AddCollection(collInfo, 11, "p1", nil, nil) assert.Nil(t, err) collInfo.ID = 2 collInfo.PartitionIDs = nil + collInfo.PartitonNames = nil collInfo.Schema.Name = "t2" - partInfo.PartitionID = 12 - partInfo.PartitionName = "p2" - t2, err := mt.AddCollection(collInfo, partInfo, nil, nil) + t2, err := mt.AddCollection(collInfo, 12, "p2", nil, nil) assert.Nil(t, err) assert.True(t, mt.HasCollection(1, 0)) @@ -1218,51 +1061,25 @@ func TestMetaWithTimestamp(t *testing.T) { assert.Nil(t, err) p2, err := mt.GetPartitionByName(2, "p2", 0) assert.Nil(t, err) - assert.Equal(t, int64(11), p1.PartitionID) - assert.Equal(t, int64(12), p2.PartitionID) + assert.Equal(t, int64(11), p1) + assert.Equal(t, int64(12), p2) assert.Nil(t, err) p1, err = mt.GetPartitionByName(1, "p1", t2) assert.Nil(t, err) p2, err = mt.GetPartitionByName(2, "p2", t2) assert.Nil(t, err) - assert.Equal(t, int64(11), p1.PartitionID) - assert.Equal(t, int64(12), p2.PartitionID) + assert.Equal(t, int64(11), p1) + assert.Equal(t, int64(12), p2) p1, err = mt.GetPartitionByName(1, "p1", t1) assert.Nil(t, err) - p2, err = mt.GetPartitionByName(2, "p2", t1) + _, err = mt.GetPartitionByName(2, "p2", t1) assert.NotNil(t, err) - assert.Equal(t, int64(11), p1.PartitionID) + assert.Equal(t, int64(11), p1) - p1, err = mt.GetPartitionByName(1, "p1", tsoStart) + _, err = mt.GetPartitionByName(1, "p1", tsoStart) assert.NotNil(t, err) - p2, err = mt.GetPartitionByName(2, "p2", tsoStart) - assert.NotNil(t, err) - - p1, err = mt.GetPartitionByID(1, 11, 0) - assert.Nil(t, err) - p2, err = mt.GetPartitionByID(2, 12, 0) - assert.Nil(t, err) - assert.Equal(t, int64(11), p1.PartitionID) - assert.Equal(t, int64(12), p2.PartitionID) - assert.Nil(t, err) - - p1, err = mt.GetPartitionByID(1, 11, t2) - assert.Nil(t, err) - p2, err = mt.GetPartitionByID(2, 12, t2) - assert.Nil(t, err) - assert.Equal(t, int64(11), p1.PartitionID) - assert.Equal(t, int64(12), p2.PartitionID) - - p1, err = mt.GetPartitionByID(1, 11, t1) - assert.Nil(t, err) - p2, err = mt.GetPartitionByID(2, 12, t1) - assert.NotNil(t, err) - assert.Equal(t, int64(11), p1.PartitionID) - - p1, err = mt.GetPartitionByID(1, 11, tsoStart) - assert.NotNil(t, err) - p2, err = mt.GetPartitionByID(2, 12, tsoStart) + _, err = mt.GetPartitionByName(2, "p2", tsoStart) assert.NotNil(t, err) } diff --git a/internal/rootcoord/param_table.go b/internal/rootcoord/param_table.go index ff3b0f15ef..10a9db8537 100644 --- a/internal/rootcoord/param_table.go +++ b/internal/rootcoord/param_table.go @@ -29,15 +29,14 @@ type ParamTable struct { Address string Port int - PulsarAddress string - RocksmqPath string - EtcdEndpoints []string - MetaRootPath string - KvRootPath string - MsgChannelSubName string - TimeTickChannel string - StatisticsChannel string - DataCoordSegmentChannel string // data service create segment, or data node flush segment + PulsarAddress string + RocksmqPath string + EtcdEndpoints []string + MetaRootPath string + KvRootPath string + MsgChannelSubName string + TimeTickChannel string + StatisticsChannel string MaxPartitionNum int64 DefaultPartitionName string @@ -70,7 +69,6 @@ func (p *ParamTable) Init() { p.initMsgChannelSubName() p.initTimeTickChannel() p.initStatisticsChannelName() - p.initSegmentInfoChannelName() p.initMaxPartitionNum() p.initMinSegmentSizeToEnableIndex() @@ -157,14 +155,6 @@ func (p *ParamTable) initStatisticsChannelName() { p.StatisticsChannel = channel } -func (p *ParamTable) initSegmentInfoChannelName() { - channel, err := p.Load("msgChannel.chanNamePrefix.dataCoordSegmentInfo") - if err != nil { - panic(err) - } - p.DataCoordSegmentChannel = channel -} - func (p *ParamTable) initMaxPartitionNum() { p.MaxPartitionNum = p.ParseInt64("rootcoord.maxPartitionNum") } diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index 463de09e34..15b963db1a 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -101,15 +101,10 @@ type Core struct { //setMsgStreams, send drop partition into dd channel SendDdDropPartitionReq func(ctx context.Context, req *internalpb.DropPartitionRequest, channelNames []string) error - // if rootcoord create segment, datacoord will put segment msg into this channel - DataCoordSegmentChan <-chan *ms.MsgPack - - // if segment flush completed, data node would put segment msg into this channel - DataNodeFlushedSegmentChan <-chan *ms.MsgPack - //get binlog file path from data service, CallGetBinlogFilePathsService func(ctx context.Context, segID typeutil.UniqueID, fieldID typeutil.UniqueID) ([]string, error) CallGetNumRowsService func(ctx context.Context, segID typeutil.UniqueID, isFromFlushedChan bool) (int64, error) + CallGetFlushedSegmentsService func(ctx context.Context, collID, partID typeutil.UniqueID) ([]typeutil.UniqueID, error) //call index builder's client to build index, return build id CallBuildIndexService func(ctx context.Context, binlog []string, field *schemapb.FieldSchema, idxInfo *etcdpb.IndexInfo) (typeutil.UniqueID, error) @@ -214,6 +209,9 @@ func (c *Core) checkInit() error { if c.CallDropIndexService == nil { return fmt.Errorf("CallDropIndexService is nil") } + if c.CallGetFlushedSegmentsService == nil { + return fmt.Errorf("CallGetFlushedSegments is nil") + } if c.NewProxyClient == nil { return fmt.Errorf("NewProxyClient is nil") } @@ -223,12 +221,6 @@ func (c *Core) checkInit() error { if c.CallReleasePartitionService == nil { return fmt.Errorf("CallReleasePartitionService is nil") } - if c.DataCoordSegmentChan == nil { - return fmt.Errorf("DataCoordSegmentChan is nil") - } - if c.DataNodeFlushedSegmentChan == nil { - return fmt.Errorf("DataNodeFlushedSegmentChan is nil") - } return nil } @@ -248,148 +240,6 @@ func (c *Core) startTimeTickLoop() { } } -// datacoord send segment info msg to rootcoord when create segment -func (c *Core) startDataCoordSegmentLoop() { - for { - select { - case <-c.ctx.Done(): - log.Debug("close data service segment loop") - return - case segMsg, ok := <-c.DataCoordSegmentChan: - if !ok { - log.Debug("data service segment channel is closed, exit loop") - return - } - var segInfos []*datapb.SegmentInfo - for _, msg := range segMsg.Msgs { - if msg.Type() != commonpb.MsgType_SegmentInfo { - continue - } - segInfoMsg, ok := msg.(*ms.SegmentInfoMsg) - if !ok { - log.Debug("input msg is not SegmentInfoMsg") - continue - } - if segInfoMsg.Segment != nil { - segInfos = append(segInfos, segInfoMsg.Segment) - log.Debug("open segment", zap.Int64("segmentID", segInfoMsg.Segment.ID)) - } - } - if len(segInfos) > 0 { - startPosStr, err := EncodeMsgPositions(segMsg.StartPositions) - if err != nil { - log.Error("encode msg start positions fail", zap.String("err", err.Error())) - continue - } - endPosStr, err := EncodeMsgPositions(segMsg.EndPositions) - if err != nil { - log.Error("encode msg end positions fail", zap.String("err", err.Error())) - continue - } - - if _, err := c.MetaTable.AddSegment(segInfos, startPosStr, endPosStr); err != nil { - //what if rootcoord add segment failed, but datacoord success? - log.Debug("add segment info meta table failed ", zap.String("error", err.Error())) - continue - } - } - } - } -} - -// data node will put msg in this channel when flush segment -func (c *Core) startDataNodeFlushedSegmentLoop() { - for { - select { - case <-c.ctx.Done(): - log.Debug("close segment flush completed loop") - return - case segMsg, ok := <-c.DataNodeFlushedSegmentChan: - if !ok { - log.Debug("data node segment flush completed chan has closed, exit loop") - return - } - - startPosStr, err := EncodeMsgPositions(segMsg.StartPositions) - if err != nil { - log.Error("encode msg start positions fail", zap.String("err", err.Error())) - continue - } - endPosStr, err := EncodeMsgPositions(segMsg.EndPositions) - if err != nil { - log.Error("encode msg end positions fail", zap.String("err", err.Error())) - continue - } - - var segIdxInfos []*etcdpb.SegmentIndexInfo - for _, msg := range segMsg.Msgs { - // check msg type - if msg.Type() != commonpb.MsgType_SegmentFlushDone { - continue - } - flushMsg, ok := msg.(*ms.FlushCompletedMsg) - if !ok { - log.Debug("input msg is not FlushCompletedMsg") - continue - } - segID := flushMsg.Segment.GetID() - log.Debug("flush segment", zap.Int64("id", segID)) - - coll, err := c.MetaTable.GetCollectionBySegmentID(segID) - if err != nil { - log.Warn("GetCollectionBySegmentID error", zap.Error(err)) - continue - } - err = c.MetaTable.AddFlushedSegment(segID) - if err != nil { - log.Warn("AddFlushedSegment error", zap.Error(err)) - continue - } - - if len(coll.FieldIndexes) == 0 { - log.Debug("no index params on collection", zap.String("collection_name", coll.Schema.Name)) - } - - for _, f := range coll.FieldIndexes { - fieldSch, err := GetFieldSchemaByID(coll, f.FiledID) - if err != nil { - log.Warn("field schema not found", zap.Int64("field id", f.FiledID)) - continue - } - - idxInfo, err := c.MetaTable.GetIndexByID(f.IndexID) - if err != nil { - log.Warn("index not found", zap.Int64("index id", f.IndexID)) - continue - } - - info := etcdpb.SegmentIndexInfo{ - SegmentID: segID, - FieldID: fieldSch.FieldID, - IndexID: idxInfo.IndexID, - EnableIndex: false, - } - info.BuildID, err = c.BuildIndex(c.ctx, segID, fieldSch, idxInfo, true) - if err == nil && info.BuildID != 0 { - info.EnableIndex = true - } else { - log.Error("build index fail", zap.Int64("buildid", info.BuildID), zap.Error(err)) - } - - segIdxInfos = append(segIdxInfos, &info) - } - } - - if len(segIdxInfos) > 0 { - _, err = c.MetaTable.AddIndex(segIdxInfos, startPosStr, endPosStr) - if err != nil { - log.Error("AddIndex fail", zap.String("err", err.Error())) - } - } - } - } -} - func (c *Core) tsLoop() { tsoTicker := time.NewTicker(tso.UpdateTimestampStep) defer tsoTicker.Stop() @@ -435,6 +285,26 @@ func (c *Core) watchProxyLoop() { } +func (c *Core) getSegments(ctx context.Context, collID typeutil.UniqueID) (map[typeutil.UniqueID]typeutil.UniqueID, error) { + collMeta, err := c.MetaTable.GetCollectionByID(collID, 0) + if err != nil { + return nil, err + } + segID2PartID := map[typeutil.UniqueID]typeutil.UniqueID{} + for _, partID := range collMeta.PartitionIDs { + if seg, err := c.CallGetFlushedSegmentsService(ctx, collID, partID); err == nil { + for _, s := range seg { + segID2PartID[s] = partID + } + } else { + log.Debug("get flushed segments from data coord failed", zap.Int64("collection_id", collID), zap.Int64("partition_id", partID), zap.Error(err)) + return nil, err + } + } + + return segID2PartID, nil +} + func (c *Core) setDdMsgSendFlag(b bool) error { flag, err := c.MetaTable.client.Load(DDMsgSendPrefix, 0) if err != nil { @@ -454,33 +324,6 @@ func (c *Core) setDdMsgSendFlag(b bool) error { return err } -func (c *Core) startMsgStreamAndSeek(chanName string, subName string, key string) (*ms.MsgStream, error) { - stream, err := c.msFactory.NewMsgStream(c.ctx) - if err != nil { - return nil, err - } - stream.AsConsumer([]string{chanName}, subName) - log.Debug("AsConsumer: " + chanName + ":" + subName) - - msgPosStr, err := c.MetaTable.client.Load(key, 0) - if err == nil { - msgPositions := make([]*ms.MsgPosition, 0) - if err := DecodeMsgPositions(msgPosStr, &msgPositions); err != nil { - return nil, fmt.Errorf("decode msg positions fail, err %s", err.Error()) - } - if len(msgPositions) > 0 { - log.Debug("msgstream seek to position", zap.String("chanName", chanName), zap.String("SubName", subName)) - if err := stream.Seek(msgPositions); err != nil { - return nil, fmt.Errorf("msg stream seek fail, err %s", err.Error()) - } - log.Debug("msg stream: " + chanName + ":" + subName + " seek to stored position") - } - } - stream.Start() - log.Debug("Start Consumer", zap.String("chanName", chanName), zap.String("SubName", subName)) - return &stream, nil -} - func (c *Core) setMsgStreams() error { if Params.PulsarAddress == "" { return fmt.Errorf("PulsarAddress is empty") @@ -606,28 +449,6 @@ func (c *Core) setMsgStreams() error { return c.dmlChannels.BroadcastAll(channelNames, &msgPack) } - if Params.DataCoordSegmentChannel == "" { - return fmt.Errorf("DataCoordSegmentChannel is empty") - } - - // data service will put msg into this channel when create segment - dsChanName := Params.DataCoordSegmentChannel - dsSubName := Params.MsgChannelSubName + "ds" - dsStream, err := c.startMsgStreamAndSeek(dsChanName, dsSubName, SegInfoMsgEndPosPrefix) - if err != nil { - return err - } - c.DataCoordSegmentChan = (*dsStream).Chan() - - // data node will put msg into this channel when flush segment - dnChanName := Params.DataCoordSegmentChannel - dnSubName := Params.MsgChannelSubName + "dn" - dnStream, err := c.startMsgStreamAndSeek(dnChanName, dnSubName, FlushedSegMsgEndPosPrefix) - if err != nil { - return err - } - c.DataNodeFlushedSegmentChan = (*dnStream).Chan() - return nil } @@ -747,6 +568,42 @@ func (c *Core) SetDataCoord(ctx context.Context, s types.DataCoord) error { retErr = nil return } + + c.CallGetFlushedSegmentsService = func(ctx context.Context, collID, partID typeutil.UniqueID) (retSegIDs []typeutil.UniqueID, retErr error) { + defer func() { + if err := recover(); err != nil { + retSegIDs = []typeutil.UniqueID{} + retErr = fmt.Errorf("get flushed segments from data coord panic, msg = %v", err) + return + } + }() + <-initCh + req := &datapb.GetFlushedSegmentsRequest{ + Base: &commonpb.MsgBase{ + MsgType: 0, //TODO,msg type + MsgID: 0, + Timestamp: 0, + SourceID: c.session.ServerID, + }, + CollectionID: collID, + PartitionID: partID, + } + rsp, err := s.GetFlushedSegments(ctx, req) + if err != nil { + retSegIDs = []typeutil.UniqueID{} + retErr = err + return + } + if rsp.Status.ErrorCode != commonpb.ErrorCode_Success { + retSegIDs = []typeutil.UniqueID{} + retErr = fmt.Errorf("get flushed segments from data coord failed, reason = %s", rsp.Status.Reason) + return + } + retSegIDs = rsp.Segments + retErr = nil + return + } + return nil } @@ -1168,8 +1025,6 @@ func (c *Core) Start() error { return } go c.startTimeTickLoop() - go c.startDataCoordSegmentLoop() - go c.startDataNodeFlushedSegmentLoop() go c.tsLoop() go c.sessionLoop() go c.chanTimeTick.StartWatch() @@ -1925,28 +1780,19 @@ func (c *Core) SegmentFlushCompleted(ctx context.Context, in *datapb.SegmentFlus segID := in.Segment.GetID() log.Debug("flush segment", zap.Int64("id", segID)) - coll, err := c.MetaTable.GetCollectionBySegmentID(segID) + coll, err := c.MetaTable.GetCollectionByID(in.Segment.CollectionID, 0) if err != nil { - log.Warn("GetCollectionBySegmentID error", zap.Error(err)) + log.Warn("GetCollectionByID error", zap.Error(err)) return &commonpb.Status{ ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: fmt.Sprintf("GetCollectionBySegmentID error = %v", err), }, nil } - err = c.MetaTable.AddFlushedSegment(segID) - if err != nil { - log.Warn("AddFlushedSegment error", zap.Error(err)) - return &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_UnexpectedError, - Reason: fmt.Sprintf("AddFlushedSegment error = %v", err), - }, nil - } if len(coll.FieldIndexes) == 0 { log.Debug("no index params on collection", zap.String("collection_name", coll.Schema.Name)) } - var segIdxInfos []*etcdpb.SegmentIndexInfo for _, f := range coll.FieldIndexes { fieldSch, err := GetFieldSchemaByID(coll, f.FiledID) if err != nil { @@ -1971,47 +1817,14 @@ func (c *Core) SegmentFlushCompleted(ctx context.Context, in *datapb.SegmentFlus info.EnableIndex = true } else { log.Error("build index fail", zap.Int64("buildid", info.BuildID), zap.Error(err)) + continue } - - segIdxInfos = append(segIdxInfos, &info) - } - if len(segIdxInfos) > 0 { - _, err = c.MetaTable.AddIndex(segIdxInfos, "", "") + _, err = c.MetaTable.AddIndex(&info, in.Segment.CollectionID, in.Segment.PartitionID) if err != nil { log.Error("AddIndex fail", zap.String("err", err.Error())) - return &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_UnexpectedError, - Reason: fmt.Sprintf("AddIndex error = %v", err), - }, nil } } - return &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_Success, - Reason: "", - }, nil -} -func (c *Core) AddNewSegment(ctx context.Context, in *datapb.SegmentMsg) (*commonpb.Status, error) { - code := c.stateCode.Load().(internalpb.StateCode) - if code != internalpb.StateCode_Healthy { - return &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_UnexpectedError, - Reason: fmt.Sprintf("state code = %s", internalpb.StateCode_name[int32(code)]), - }, nil - } - if in.Base.MsgType != commonpb.MsgType_SegmentInfo { - return &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_UnexpectedError, - Reason: fmt.Sprintf("AddNewSegment with incorrect msgtype = %s", commonpb.MsgType_name[int32(in.Base.MsgType)]), - }, nil - } - if _, err := c.MetaTable.AddSegment([]*datapb.SegmentInfo{in.Segment}, "", ""); err != nil { - log.Debug("add segment info meta table failed ", zap.String("error", err.Error())) - return &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_UnexpectedError, - Reason: fmt.Sprintf("add segment info meta table failed, error = %v", err), - }, nil - } return &commonpb.Status{ ErrorCode: commonpb.ErrorCode_Success, Reason: "", diff --git a/internal/rootcoord/root_coord_test.go b/internal/rootcoord/root_coord_test.go index 941b4d21f1..7c0c55dd21 100644 --- a/internal/rootcoord/root_coord_test.go +++ b/internal/rootcoord/root_coord_test.go @@ -26,12 +26,14 @@ import ( "github.com/milvus-io/milvus/internal/msgstream" "github.com/milvus-io/milvus/internal/proto/commonpb" "github.com/milvus-io/milvus/internal/proto/datapb" + "github.com/milvus-io/milvus/internal/proto/etcdpb" "github.com/milvus-io/milvus/internal/proto/indexpb" "github.com/milvus-io/milvus/internal/proto/internalpb" "github.com/milvus-io/milvus/internal/proto/milvuspb" "github.com/milvus-io/milvus/internal/proto/proxypb" "github.com/milvus-io/milvus/internal/proto/querypb" + "github.com/milvus-io/milvus/internal/proto/rootcoordpb" "github.com/milvus-io/milvus/internal/proto/schemapb" "github.com/milvus-io/milvus/internal/types" @@ -66,6 +68,8 @@ func (p *proxyMock) GetCollArray() []string { type dataMock struct { types.DataCoord randVal int + mu sync.Mutex + segs []typeutil.UniqueID } func (d *dataMock) Init() error { @@ -114,13 +118,18 @@ func (d *dataMock) GetSegmentInfo(ctx context.Context, req *datapb.GetSegmentInf }, nil } -func (d *dataMock) GetSegmentInfoChannel(ctx context.Context) (*milvuspb.StringResponse, error) { - return &milvuspb.StringResponse{ +func (d *dataMock) GetFlushedSegments(ctx context.Context, req *datapb.GetFlushedSegmentsRequest) (*datapb.GetFlushedSegmentsResponse, error) { + d.mu.Lock() + defer d.mu.Unlock() + + rsp := &datapb.GetFlushedSegmentsResponse{ Status: &commonpb.Status{ ErrorCode: commonpb.ErrorCode_Success, + Reason: "", }, - Value: fmt.Sprintf("segment-info-channel-%d", d.randVal), - }, nil + } + rsp.Segments = append(rsp.Segments, d.segs...) + return rsp, nil } type queryMock struct { @@ -308,7 +317,6 @@ func TestRootCoord(t *testing.T) { Params.MetaRootPath = fmt.Sprintf("/%d/%s", randVal, Params.MetaRootPath) Params.KvRootPath = fmt.Sprintf("/%d/%s", randVal, Params.KvRootPath) Params.MsgChannelSubName = fmt.Sprintf("subname-%d", randVal) - Params.DataCoordSegmentChannel = fmt.Sprintf("data-service-segment-%d", randVal) err = core.Register() assert.Nil(t, err) @@ -369,32 +377,12 @@ func TestRootCoord(t *testing.T) { err = tmpFactory.SetParams(m) assert.Nil(t, err) - dataCoordSegmentStream, _ := tmpFactory.NewMsgStream(ctx) - dataCoordSegmentStream.AsProducer([]string{Params.DataCoordSegmentChannel}) - timeTickStream, _ := tmpFactory.NewMsgStream(ctx) timeTickStream.AsConsumer([]string{Params.TimeTickChannel}, Params.MsgChannelSubName) timeTickStream.Start() dmlStream, _ := tmpFactory.NewMsgStream(ctx) - // test dataCoordSegmentStream seek - dataNodeSubName := Params.MsgChannelSubName + "dn" - flushedSegStream, _ := tmpFactory.NewMsgStream(ctx) - flushedSegStream.AsConsumer([]string{Params.DataCoordSegmentChannel}, dataNodeSubName) - flushedSegStream.Start() - msgPackTmp := GenFlushedSegMsgPack(9999) - err = dataCoordSegmentStream.Produce(msgPackTmp) - assert.Nil(t, err) - - flushedSegMsgPack := flushedSegStream.Consume() - flushedSegStream.Close() - - flushedSegPosStr, _ := EncodeMsgPositions(flushedSegMsgPack.EndPositions) - - _, err = etcdCli.Put(ctx, path.Join(Params.MetaRootPath, FlushedSegMsgEndPosPrefix), flushedSegPosStr) - assert.Nil(t, err) - err = core.Init() assert.Nil(t, err) @@ -677,16 +665,16 @@ func TestRootCoord(t *testing.T) { collMeta, err := core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) assert.Equal(t, 2, len(collMeta.PartitionIDs)) - partMeta, err := core.MetaTable.GetPartitionByID(1, collMeta.PartitionIDs[1], 0) + partNameIdx1, err := core.MetaTable.GetPartitionNameByID(collMeta.ID, collMeta.PartitionIDs[1], 0) assert.Nil(t, err) - assert.Equal(t, partName, partMeta.PartitionName) + assert.Equal(t, partName, partNameIdx1) msgs := getNotTtMsg(ctx, 1, dmlStream.Chan()) assert.Equal(t, 1, len(msgs)) partMsg, ok := (msgs[0]).(*msgstream.CreatePartitionMsg) assert.True(t, ok) assert.Equal(t, collMeta.ID, partMsg.CollectionID) - assert.Equal(t, partMeta.PartitionID, partMsg.PartitionID) + assert.Equal(t, collMeta.PartitionIDs[1], partMsg.PartitionID) assert.Equal(t, 1, len(pnm.GetCollArray())) assert.Equal(t, collName, pnm.GetCollArray()[0]) @@ -706,7 +694,7 @@ func TestRootCoord(t *testing.T) { err = proto.UnmarshalText(ddOp.Body, &ddReq) assert.Nil(t, err) assert.Equal(t, collMeta.ID, ddReq.CollectionID) - assert.Equal(t, partMeta.PartitionID, ddReq.PartitionID) + assert.Equal(t, collMeta.PartitionIDs[1], ddReq.PartitionID) }) t.Run("has partition", func(t *testing.T) { @@ -752,23 +740,9 @@ func TestRootCoord(t *testing.T) { coll, err := core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) partID := coll.PartitionIDs[1] - part, err := core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Zero(t, len(part.SegmentIDs)) - - seg := &datapb.SegmentInfo{ - ID: 1000, - CollectionID: coll.ID, - PartitionID: part.PartitionID, - } - segInfoMsgPack := GenSegInfoMsgPack(seg) - err = dataCoordSegmentStream.Broadcast(segInfoMsgPack) - assert.Nil(t, err) - time.Sleep(time.Second) - - part, err = core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Equal(t, 1, len(part.SegmentIDs)) + dm.mu.Lock() + dm.segs = []typeutil.UniqueID{1000} + dm.mu.Unlock() req := &milvuspb.ShowSegmentsRequest{ Base: &commonpb.MsgBase{ @@ -893,28 +867,20 @@ func TestRootCoord(t *testing.T) { coll, err := core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) partID := coll.PartitionIDs[1] - part, err := core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Equal(t, 1, len(part.SegmentIDs)) - seg := &datapb.SegmentInfo{ - ID: segID, - CollectionID: coll.ID, - PartitionID: part.PartitionID, + flushMsg := datapb.SegmentFlushCompletedMsg{ + Base: &commonpb.MsgBase{ + MsgType: commonpb.MsgType_SegmentFlushDone, + }, + Segment: &datapb.SegmentInfo{ + ID: segID, + CollectionID: coll.ID, + PartitionID: partID, + }, } - segInfoMsgPack := GenSegInfoMsgPack(seg) - err = dataCoordSegmentStream.Broadcast(segInfoMsgPack) + st, err := core.SegmentFlushCompleted(ctx, &flushMsg) assert.Nil(t, err) - time.Sleep(time.Second) - - part, err = core.MetaTable.GetPartitionByID(1, partID, 0) - assert.Nil(t, err) - assert.Equal(t, 2, len(part.SegmentIDs)) - - flushedSegMsgPack := GenFlushedSegMsgPack(segID) - err = dataCoordSegmentStream.Broadcast(flushedSegMsgPack) - assert.Nil(t, err) - time.Sleep(time.Second) + assert.Equal(t, st.ErrorCode, commonpb.ErrorCode_Success) req := &milvuspb.DescribeIndexRequest{ Base: &commonpb.MsgBase{ @@ -1031,9 +997,9 @@ func TestRootCoord(t *testing.T) { collMeta, err = core.MetaTable.GetCollectionByName(collName, 0) assert.Nil(t, err) assert.Equal(t, 1, len(collMeta.PartitionIDs)) - partMeta, err := core.MetaTable.GetPartitionByID(1, collMeta.PartitionIDs[0], 0) + partName, err := core.MetaTable.GetPartitionNameByID(collMeta.ID, collMeta.PartitionIDs[0], 0) assert.Nil(t, err) - assert.Equal(t, Params.DefaultPartitionName, partMeta.PartitionName) + assert.Equal(t, Params.DefaultPartitionName, partName) msgs := getNotTtMsg(ctx, 1, dmlStream.Chan()) assert.Equal(t, 1, len(msgs)) @@ -1834,9 +1800,6 @@ func TestRootCoord2(t *testing.T) { err = msFactory.SetParams(m) assert.Nil(t, err) - dataCoordSegmentStream, _ := msFactory.NewMsgStream(ctx) - dataCoordSegmentStream.AsProducer([]string{Params.DataCoordSegmentChannel}) - timeTickStream, _ := msFactory.NewMsgStream(ctx) timeTickStream.AsConsumer([]string{Params.TimeTickChannel}, Params.MsgChannelSubName) timeTickStream.Start() @@ -1972,6 +1935,12 @@ func TestCheckInit(t *testing.T) { err = c.checkInit() assert.NotNil(t, err) + c.CallGetFlushedSegmentsService = func(ctx context.Context, collID, partID typeutil.UniqueID) ([]typeutil.UniqueID, error) { + return nil, nil + } + err = c.checkInit() + assert.NotNil(t, err) + c.CallBuildIndexService = func(ctx context.Context, binlog []string, field *schemapb.FieldSchema, idxInfo *etcdpb.IndexInfo) (typeutil.UniqueID, error) { return 0, nil } @@ -2000,13 +1969,5 @@ func TestCheckInit(t *testing.T) { return nil } err = c.checkInit() - assert.NotNil(t, err) - - c.DataCoordSegmentChan = make(chan *msgstream.MsgPack) - err = c.checkInit() - assert.NotNil(t, err) - - c.DataNodeFlushedSegmentChan = make(chan *msgstream.MsgPack) - err = c.checkInit() assert.Nil(t, err) } diff --git a/internal/rootcoord/task.go b/internal/rootcoord/task.go index 1f4d1651c8..c4d5c809d3 100644 --- a/internal/rootcoord/task.go +++ b/internal/rootcoord/task.go @@ -146,12 +146,6 @@ func (t *CreateCollectionReqTask) Execute(ctx context.Context) error { PhysicalChannelNames: chanNames, } - // every collection has _default partition - partInfo := etcdpb.PartitionInfo{ - PartitionName: Params.DefaultPartitionName, - PartitionID: partID, - SegmentIDs: make([]typeutil.UniqueID, 0, 16), - } idxInfo := make([]*etcdpb.IndexInfo, 0, 16) /////////////////////// ignore index param from create_collection ///////////////////////// //for _, field := range schema.Fields { @@ -206,7 +200,7 @@ func (t *CreateCollectionReqTask) Execute(ctx context.Context) error { PartitionName: Params.DefaultPartitionName, DbID: 0, //TODO, not used CollectionID: collInfo.ID, - PartitionID: partInfo.PartitionID, + PartitionID: partID, } // build DdOperation and save it into etcd, when ddmsg send fail, @@ -217,7 +211,7 @@ func (t *CreateCollectionReqTask) Execute(ctx context.Context) error { return EncodeDdOperation(&ddCollReq, &ddPartReq, CreateCollectionDDType) } - ts, err := t.core.MetaTable.AddCollection(&collInfo, &partInfo, idxInfo, ddOp) + ts, err := t.core.MetaTable.AddCollection(&collInfo, partID, Params.DefaultPartitionName, idxInfo, ddOp) if err != nil { return err } @@ -266,6 +260,10 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error { DbID: 0, //not used CollectionID: collMeta.ID, } + segIDs, err := t.core.CallGetFlushedSegmentsService(ctx, collMeta.ID, -1) + if err != nil { + log.Debug("Get flushed segment from data coords failed", zap.String("collection_name", t.Req.CollectionName), zap.Error(err)) + } // build DdOperation and save it into etcd, when ddmsg send fail, // system can restore ddmsg from etcd and re-send @@ -274,7 +272,7 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error { return EncodeDdOperation(&ddReq, nil, DropCollectionDDType) } - ts, err := t.core.MetaTable.DeleteCollection(collMeta.ID, ddOp) + ts, err := t.core.MetaTable.DeleteCollection(collMeta.ID, segIDs, ddOp) if err != nil { return err } @@ -490,10 +488,14 @@ func (t *DropPartitionReqTask) Execute(ctx context.Context) error { if err != nil { return err } - partInfo, err := t.core.MetaTable.GetPartitionByName(collInfo.ID, t.Req.PartitionName, 0) + partID, err := t.core.MetaTable.GetPartitionByName(collInfo.ID, t.Req.PartitionName, 0) if err != nil { return err } + segIDs, err := t.core.CallGetFlushedSegmentsService(ctx, collInfo.ID, partID) + if err != nil { + log.Debug("get flushed segments from data coord failed", zap.String("collection_name", t.Req.CollectionName), zap.String("partition_name", t.Req.PartitionName)) + } ddReq := internalpb.DropPartitionRequest{ Base: t.Req.Base, @@ -502,7 +504,7 @@ func (t *DropPartitionReqTask) Execute(ctx context.Context) error { PartitionName: t.Req.PartitionName, DbID: 0, //todo,not used CollectionID: collInfo.ID, - PartitionID: partInfo.PartitionID, + PartitionID: partID, } // build DdOperation and save it into etcd, when ddmsg send fail, @@ -512,7 +514,7 @@ func (t *DropPartitionReqTask) Execute(ctx context.Context) error { return EncodeDdOperation(&ddReq, nil, DropPartitionDDType) } - ts, _, err := t.core.MetaTable.DeletePartition(collInfo.ID, t.Req.PartitionName, ddOp) + ts, _, err := t.core.MetaTable.DeletePartition(collInfo.ID, t.Req.PartitionName, segIDs, ddOp) if err != nil { return err } @@ -539,7 +541,7 @@ func (t *DropPartitionReqTask) Execute(ctx context.Context) error { //notify query service to release partition go func() { - if err = t.core.CallReleasePartitionService(t.core.ctx, ts, 0, collInfo.ID, []typeutil.UniqueID{partInfo.PartitionID}); err != nil { + if err = t.core.CallReleasePartitionService(t.core.ctx, ts, 0, collInfo.ID, []typeutil.UniqueID{partID}); err != nil { log.Warn("CallReleaseCollectionService failed", zap.String("error", err.Error())) } }() @@ -594,14 +596,9 @@ func (t *ShowPartitionReqTask) Execute(ctx context.Context) error { if err != nil { return err } - for _, partID := range coll.PartitionIDs { - partMeta, err := t.core.MetaTable.GetPartitionByID(coll.ID, partID, 0) - if err != nil { - return err - } - t.Rsp.PartitionIDs = append(t.Rsp.PartitionIDs, partMeta.PartitionID) - t.Rsp.PartitionNames = append(t.Rsp.PartitionNames, partMeta.PartitionName) - } + t.Rsp.PartitionIDs = coll.PartitionIDs + t.Rsp.PartitionNames = coll.PartitonNames + return nil } @@ -624,21 +621,19 @@ func (t *DescribeSegmentReqTask) Execute(ctx context.Context) error { return err } exist := false - for _, partID := range coll.PartitionIDs { - if exist { - break - } - partMeta, err := t.core.MetaTable.GetPartitionByID(coll.ID, partID, 0) - if err != nil { - return err - } - for _, e := range partMeta.SegmentIDs { - if e == t.Req.SegmentID { + segIDs, err := t.core.CallGetFlushedSegmentsService(ctx, t.Req.CollectionID, -1) + if err != nil { + log.Debug("get flushed segment from data coord failed", zap.String("collection_name", coll.Schema.Name), zap.Error(err)) + exist = true + } else { + for _, id := range segIDs { + if id == t.Req.SegmentID { exist = true break } } } + if !exist { return fmt.Errorf("segment id %d not belong to collection id %d", t.Req.SegmentID, t.Req.CollectionID) } @@ -683,11 +678,13 @@ func (t *ShowSegmentReqTask) Execute(ctx context.Context) error { if !exist { return fmt.Errorf("partition id = %d not belong to collection id = %d", t.Req.PartitionID, t.Req.CollectionID) } - partMeta, err := t.core.MetaTable.GetPartitionByID(coll.ID, t.Req.PartitionID, 0) + segIDs, err := t.core.CallGetFlushedSegmentsService(ctx, t.Req.CollectionID, t.Req.PartitionID) if err != nil { + log.Debug("get flushed segments from data coord failed", zap.String("collection name", coll.Schema.Name), zap.Int64("partition id", t.Req.PartitionID), zap.Error(err)) return err } - t.Rsp.SegmentIDs = append(t.Rsp.SegmentIDs, partMeta.SegmentIDs...) + + t.Rsp.SegmentIDs = append(t.Rsp.SegmentIDs, segIDs...) return nil } @@ -715,16 +712,29 @@ func (t *CreateIndexReqTask) Execute(ctx context.Context) error { IndexID: indexID, IndexParams: t.Req.ExtraParams, } - segIDs, field, err := t.core.MetaTable.GetNotIndexedSegments(t.Req.CollectionName, t.Req.FieldName, idxInfo) - log.Debug("RootCoord CreateIndexReqTask metaTable.GetNotIndexedSegments", zap.Error(err)) + collMeta, err := t.core.MetaTable.GetCollectionByName(t.Req.CollectionName, 0) if err != nil { return err } + segID2PartID, err := t.core.getSegments(ctx, collMeta.ID) + flushedSegs := make([]typeutil.UniqueID, 0, len(segID2PartID)) + for k := range segID2PartID { + flushedSegs = append(flushedSegs, k) + } + if err != nil { + log.Debug("get flushed segments from data coord failed", zap.String("collection_name", collMeta.Schema.Name), zap.Error(err)) + return err + } + + segIDs, field, err := t.core.MetaTable.GetNotIndexedSegments(t.Req.CollectionName, t.Req.FieldName, idxInfo, flushedSegs) + if err != nil { + log.Debug("RootCoord CreateIndexReqTask metaTable.GetNotIndexedSegments", zap.Error(err)) + return err + } if field.DataType != schemapb.DataType_FloatVector && field.DataType != schemapb.DataType_BinaryVector { return fmt.Errorf("field name = %s, data type = %s", t.Req.FieldName, schemapb.DataType_name[int32(field.DataType)]) } - var segIdxInfos []*etcdpb.SegmentIndexInfo for _, segID := range segIDs { info := etcdpb.SegmentIndexInfo{ SegmentID: segID, @@ -739,12 +749,13 @@ func (t *CreateIndexReqTask) Execute(ctx context.Context) error { if info.BuildID != 0 { info.EnableIndex = true } - segIdxInfos = append(segIdxInfos, &info) + partID := segID2PartID[segID] + if _, err := t.core.MetaTable.AddIndex(&info, collMeta.ID, partID); err != nil { + log.Debug("Add index into meta table failed", zap.Int64("collection_id", collMeta.ID), zap.Int64("index_id", info.IndexID), zap.Int64("build_id", info.BuildID), zap.Error(err)) + } } - _, err = t.core.MetaTable.AddIndex(segIdxInfos, "", "") - log.Debug("RootCoord CreateIndexReq", zap.Any("segIdxInfos", segIdxInfos), zap.Error(err)) - return err + return nil } type DescribeIndexReqTask struct { @@ -795,7 +806,7 @@ func (t *DropIndexReqTask) Execute(ctx context.Context) error { if t.Type() != commonpb.MsgType_DropIndex { return fmt.Errorf("drop index, msg type = %s", commonpb.MsgType_name[int32(t.Type())]) } - _, info, err := t.core.MetaTable.GetIndexByName(t.Req.CollectionName, t.Req.IndexName) + collInfo, info, err := t.core.MetaTable.GetIndexByName(t.Req.CollectionName, t.Req.IndexName) if err != nil { log.Warn("GetIndexByName failed,", zap.String("collection name", t.Req.CollectionName), zap.String("field name", t.Req.FieldName), zap.String("index name", t.Req.IndexName), zap.Error(err)) return err @@ -806,10 +817,15 @@ func (t *DropIndexReqTask) Execute(ctx context.Context) error { if len(info) != 1 { return fmt.Errorf("len(index) = %d", len(info)) } + segIDs, err := t.core.CallGetFlushedSegmentsService(t.ctx, collInfo.ID, -1) + if err != nil { + log.Debug("call get flushed segments from data coord failed", zap.String("collection_name", collInfo.Schema.Name), zap.Error(err)) + } + err = t.core.CallDropIndexService(ctx, info[0].IndexID) if err != nil { return err } - _, _, _, err = t.core.MetaTable.DropIndex(t.Req.CollectionName, t.Req.FieldName, t.Req.IndexName) + _, _, _, err = t.core.MetaTable.DropIndex(t.Req.CollectionName, t.Req.FieldName, t.Req.IndexName, segIDs) return err } diff --git a/internal/rootcoord/util.go b/internal/rootcoord/util.go index 1d8b7d3ae4..b604148527 100644 --- a/internal/rootcoord/util.go +++ b/internal/rootcoord/util.go @@ -96,7 +96,6 @@ func SegmentIndexInfoEqual(info1 *etcdpb.SegmentIndexInfo, info2 *etcdpb.Segment return info1.SegmentID == info2.SegmentID && info1.FieldID == info2.FieldID && info1.IndexID == info2.IndexID && - info1.BuildID == info2.BuildID && info1.EnableIndex == info2.EnableIndex } diff --git a/internal/types/types.go b/internal/types/types.go index d5a5dbf0e0..165896b87a 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -111,7 +111,6 @@ type RootCoord interface { ShowSegments(ctx context.Context, req *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) ReleaseDQLMessageStream(ctx context.Context, in *proxypb.ReleaseDQLMessageStreamRequest) (*commonpb.Status, error) SegmentFlushCompleted(ctx context.Context, in *datapb.SegmentFlushCompletedMsg) (*commonpb.Status, error) - AddNewSegment(ctx context.Context, in *datapb.SegmentMsg) (*commonpb.Status, error) } // RootCoordComponent is used by grpc server of RootCoord