diff --git a/internal/core/src/pb/service_msg.pb.cc b/internal/core/src/pb/service_msg.pb.cc index efefdb50eb..1de5625800 100644 --- a/internal/core/src/pb/service_msg.pb.cc +++ b/internal/core/src/pb/service_msg.pb.cc @@ -38,6 +38,10 @@ class RowBatchDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _RowBatch_default_instance_; +class VectorValuesDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _VectorValues_default_instance_; class PlaceholderValueDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; @@ -317,8 +321,23 @@ static void InitDefaultsscc_info_StringResponse_service_5fmsg_2eproto() { {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_StringResponse_service_5fmsg_2eproto}, { &scc_info_Status_common_2eproto.base,}}; -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_service_5fmsg_2eproto[15]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_service_5fmsg_2eproto = nullptr; +static void InitDefaultsscc_info_VectorValues_service_5fmsg_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::proto::service::_VectorValues_default_instance_; + new (ptr) ::milvus::proto::service::VectorValues(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::proto::service::VectorValues::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_VectorValues_service_5fmsg_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_VectorValues_service_5fmsg_2eproto}, { + &scc_info_Blob_common_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_service_5fmsg_2eproto[16]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_service_5fmsg_2eproto[1]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_service_5fmsg_2eproto = nullptr; const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_service_5fmsg_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -343,13 +362,20 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_service_5fmsg_2eproto::offsets PROTOBUF_FIELD_OFFSET(::milvus::proto::service::RowBatch, collection_name_), PROTOBUF_FIELD_OFFSET(::milvus::proto::service::RowBatch, partition_tag_), PROTOBUF_FIELD_OFFSET(::milvus::proto::service::RowBatch, row_data_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::service::RowBatch, hash_values_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::service::RowBatch, hash_keys_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::service::VectorValues, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::service::VectorValues, value_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::service::PlaceholderValue, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::milvus::proto::service::PlaceholderValue, tag_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::service::PlaceholderValue, type_), PROTOBUF_FIELD_OFFSET(::milvus::proto::service::PlaceholderValue, value_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::service::Query, _internal_metadata_), @@ -439,24 +465,26 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 0, -1, sizeof(::milvus::proto::service::CollectionName)}, { 6, -1, sizeof(::milvus::proto::service::PartitionName)}, { 13, -1, sizeof(::milvus::proto::service::RowBatch)}, - { 22, -1, sizeof(::milvus::proto::service::PlaceholderValue)}, - { 29, -1, sizeof(::milvus::proto::service::Query)}, - { 38, -1, sizeof(::milvus::proto::service::StringResponse)}, - { 45, -1, sizeof(::milvus::proto::service::BoolResponse)}, - { 52, -1, sizeof(::milvus::proto::service::StringListResponse)}, - { 59, -1, sizeof(::milvus::proto::service::IntegerListResponse)}, - { 66, -1, sizeof(::milvus::proto::service::IntegerRangeResponse)}, - { 74, -1, sizeof(::milvus::proto::service::CollectionDescription)}, - { 82, -1, sizeof(::milvus::proto::service::PartitionDescription)}, - { 90, -1, sizeof(::milvus::proto::service::Score)}, - { 97, -1, sizeof(::milvus::proto::service::Hits)}, - { 105, -1, sizeof(::milvus::proto::service::QueryResult)}, + { 22, -1, sizeof(::milvus::proto::service::VectorValues)}, + { 28, -1, sizeof(::milvus::proto::service::PlaceholderValue)}, + { 36, -1, sizeof(::milvus::proto::service::Query)}, + { 45, -1, sizeof(::milvus::proto::service::StringResponse)}, + { 52, -1, sizeof(::milvus::proto::service::BoolResponse)}, + { 59, -1, sizeof(::milvus::proto::service::StringListResponse)}, + { 66, -1, sizeof(::milvus::proto::service::IntegerListResponse)}, + { 73, -1, sizeof(::milvus::proto::service::IntegerRangeResponse)}, + { 81, -1, sizeof(::milvus::proto::service::CollectionDescription)}, + { 89, -1, sizeof(::milvus::proto::service::PartitionDescription)}, + { 97, -1, sizeof(::milvus::proto::service::Score)}, + { 104, -1, sizeof(::milvus::proto::service::Hits)}, + { 112, -1, sizeof(::milvus::proto::service::QueryResult)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { reinterpret_cast(&::milvus::proto::service::_CollectionName_default_instance_), reinterpret_cast(&::milvus::proto::service::_PartitionName_default_instance_), reinterpret_cast(&::milvus::proto::service::_RowBatch_default_instance_), + reinterpret_cast(&::milvus::proto::service::_VectorValues_default_instance_), reinterpret_cast(&::milvus::proto::service::_PlaceholderValue_default_instance_), reinterpret_cast(&::milvus::proto::service::_Query_default_instance_), reinterpret_cast(&::milvus::proto::service::_StringResponse_default_instance_), @@ -476,49 +504,53 @@ const char descriptor_table_protodef_service_5fmsg_2eproto[] PROTOBUF_SECTION_VA "e\032\014common.proto\032\014schema.proto\")\n\016Collect" "ionName\022\027\n\017collection_name\030\001 \001(\t\"5\n\rPart" "itionName\022\027\n\017collection_name\030\001 \001(\t\022\013\n\003ta" - "g\030\002 \001(\t\"|\n\010RowBatch\022\027\n\017collection_name\030\001" + "g\030\002 \001(\t\"z\n\010RowBatch\022\027\n\017collection_name\030\001" " \001(\t\022\025\n\rpartition_tag\030\002 \001(\t\022+\n\010row_data\030" - "\003 \003(\0132\031.milvus.proto.common.Blob\022\023\n\013hash" - "_values\030\004 \003(\005\"I\n\020PlaceholderValue\022\013\n\003tag" - "\030\001 \001(\t\022(\n\005value\030\002 \001(\0132\031.milvus.proto.com" - "mon.Blob\"\203\001\n\005Query\022\027\n\017collection_name\030\001 " - "\001(\t\022\026\n\016partition_tags\030\002 \003(\t\022\013\n\003dsl\030\003 \001(\t" - "\022<\n\014placeholders\030\004 \003(\0132&.milvus.proto.se" - "rvice.PlaceholderValue\"L\n\016StringResponse" - "\022+\n\006status\030\001 \001(\0132\033.milvus.proto.common.S" - "tatus\022\r\n\005value\030\002 \001(\t\"J\n\014BoolResponse\022+\n\006" + "\003 \003(\0132\031.milvus.proto.common.Blob\022\021\n\thash" + "_keys\030\004 \003(\005\"8\n\014VectorValues\022(\n\005value\030\001 \003" + "(\0132\031.milvus.proto.common.Blob\"~\n\020Placeho" + "lderValue\022\013\n\003tag\030\001 \001(\t\0223\n\004type\030\002 \001(\0162%.m" + "ilvus.proto.service.PlaceholderType\022(\n\005v" + "alue\030\003 \001(\0132\031.milvus.proto.common.Blob\"\203\001" + "\n\005Query\022\027\n\017collection_name\030\001 \001(\t\022\026\n\016part" + "ition_tags\030\002 \003(\t\022\013\n\003dsl\030\003 \001(\t\022<\n\014placeho" + "lders\030\004 \003(\0132&.milvus.proto.service.Place" + "holderValue\"L\n\016StringResponse\022+\n\006status\030" + "\001 \001(\0132\033.milvus.proto.common.Status\022\r\n\005va" + "lue\030\002 \001(\t\"J\n\014BoolResponse\022+\n\006status\030\001 \001(" + "\0132\033.milvus.proto.common.Status\022\r\n\005value\030" + "\002 \001(\010\"Q\n\022StringListResponse\022+\n\006status\030\001 " + "\001(\0132\033.milvus.proto.common.Status\022\016\n\006valu" + "es\030\002 \003(\t\"R\n\023IntegerListResponse\022+\n\006statu" + "s\030\001 \001(\0132\033.milvus.proto.common.Status\022\016\n\006" + "values\030\002 \003(\003\"_\n\024IntegerRangeResponse\022+\n\006" "status\030\001 \001(\0132\033.milvus.proto.common.Statu" - "s\022\r\n\005value\030\002 \001(\010\"Q\n\022StringListResponse\022+" - "\n\006status\030\001 \001(\0132\033.milvus.proto.common.Sta" - "tus\022\016\n\006values\030\002 \003(\t\"R\n\023IntegerListRespon" - "se\022+\n\006status\030\001 \001(\0132\033.milvus.proto.common" - ".Status\022\016\n\006values\030\002 \003(\003\"_\n\024IntegerRangeR" - "esponse\022+\n\006status\030\001 \001(\0132\033.milvus.proto.c" - "ommon.Status\022\r\n\005begin\030\002 \003(\003\022\013\n\003end\030\003 \003(\003" - "\"\262\001\n\025CollectionDescription\022+\n\006status\030\001 \001" - "(\0132\033.milvus.proto.common.Status\0225\n\006schem" - "a\030\002 \001(\0132%.milvus.proto.schema.Collection" - "Schema\0225\n\nstatistics\030\003 \003(\0132!.milvus.prot" - "o.common.KeyValuePair\"\255\001\n\024PartitionDescr" - "iption\022+\n\006status\030\001 \001(\0132\033.milvus.proto.co" - "mmon.Status\0221\n\004name\030\002 \001(\0132#.milvus.proto" - ".service.PartitionName\0225\n\nstatistics\030\003 \003" - "(\0132!.milvus.proto.common.KeyValuePair\"$\n" - "\005Score\022\013\n\003tag\030\001 \001(\t\022\016\n\006values\030\002 \003(\002\"m\n\004H" - "its\022\013\n\003ids\030\001 \003(\003\022+\n\010row_data\030\002 \003(\0132\031.mil" - "vus.proto.common.Blob\022+\n\006scores\030\003 \003(\0132\033." - "milvus.proto.service.Score\"d\n\013QueryResul" - "t\022+\n\006status\030\001 \001(\0132\033.milvus.proto.common." - "Status\022(\n\004hits\030\002 \003(\0132\032.milvus.proto.serv" - "ice.HitsBCZAgithub.com/zilliztech/milvus" - "-distributed/internal/proto/servicepbb\006p" - "roto3" + "s\022\r\n\005begin\030\002 \001(\003\022\013\n\003end\030\003 \001(\003\"\262\001\n\025Collec" + "tionDescription\022+\n\006status\030\001 \001(\0132\033.milvus" + ".proto.common.Status\0225\n\006schema\030\002 \001(\0132%.m" + "ilvus.proto.schema.CollectionSchema\0225\n\ns" + "tatistics\030\003 \003(\0132!.milvus.proto.common.Ke" + "yValuePair\"\255\001\n\024PartitionDescription\022+\n\006s" + "tatus\030\001 \001(\0132\033.milvus.proto.common.Status" + "\0221\n\004name\030\002 \001(\0132#.milvus.proto.service.Pa" + "rtitionName\0225\n\nstatistics\030\003 \003(\0132!.milvus" + ".proto.common.KeyValuePair\"$\n\005Score\022\013\n\003t" + "ag\030\001 \001(\t\022\016\n\006values\030\002 \003(\002\"m\n\004Hits\022\013\n\003ids\030" + "\001 \003(\003\022+\n\010row_data\030\002 \003(\0132\031.milvus.proto.c" + "ommon.Blob\022+\n\006scores\030\003 \003(\0132\033.milvus.prot" + "o.service.Score\"d\n\013QueryResult\022+\n\006status" + "\030\001 \001(\0132\033.milvus.proto.common.Status\022(\n\004h" + "its\030\002 \003(\0132\032.milvus.proto.service.Hits*@\n" + "\017PlaceholderType\022\010\n\004NONE\020\000\022\021\n\rVECTOR_BIN" + "ARY\020d\022\020\n\014VECTOR_FLOAT\020eBCZAgithub.com/zi" + "lliztech/milvus-distributed/internal/pro" + "to/servicepbb\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_service_5fmsg_2eproto_deps[2] = { &::descriptor_table_common_2eproto, &::descriptor_table_schema_2eproto, }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_service_5fmsg_2eproto_sccs[15] = { +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_service_5fmsg_2eproto_sccs[16] = { &scc_info_BoolResponse_service_5fmsg_2eproto.base, &scc_info_CollectionDescription_service_5fmsg_2eproto.base, &scc_info_CollectionName_service_5fmsg_2eproto.base, @@ -534,14 +566,15 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_ser &scc_info_Score_service_5fmsg_2eproto.base, &scc_info_StringListResponse_service_5fmsg_2eproto.base, &scc_info_StringResponse_service_5fmsg_2eproto.base, + &scc_info_VectorValues_service_5fmsg_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_service_5fmsg_2eproto_once; static bool descriptor_table_service_5fmsg_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_service_5fmsg_2eproto = { - &descriptor_table_service_5fmsg_2eproto_initialized, descriptor_table_protodef_service_5fmsg_2eproto, "service_msg.proto", 1605, - &descriptor_table_service_5fmsg_2eproto_once, descriptor_table_service_5fmsg_2eproto_sccs, descriptor_table_service_5fmsg_2eproto_deps, 15, 2, + &descriptor_table_service_5fmsg_2eproto_initialized, descriptor_table_protodef_service_5fmsg_2eproto, "service_msg.proto", 1780, + &descriptor_table_service_5fmsg_2eproto_once, descriptor_table_service_5fmsg_2eproto_sccs, descriptor_table_service_5fmsg_2eproto_deps, 16, 2, schemas, file_default_instances, TableStruct_service_5fmsg_2eproto::offsets, - file_level_metadata_service_5fmsg_2eproto, 15, file_level_enum_descriptors_service_5fmsg_2eproto, file_level_service_descriptors_service_5fmsg_2eproto, + file_level_metadata_service_5fmsg_2eproto, 16, file_level_enum_descriptors_service_5fmsg_2eproto, file_level_service_descriptors_service_5fmsg_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. @@ -549,6 +582,21 @@ static bool dynamic_init_dummy_service_5fmsg_2eproto = ( ::PROTOBUF_NAMESPACE_I namespace milvus { namespace proto { namespace service { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceholderType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_service_5fmsg_2eproto); + return file_level_enum_descriptors_service_5fmsg_2eproto[0]; +} +bool PlaceholderType_IsValid(int value) { + switch (value) { + case 0: + case 100: + case 101: + return true; + default: + return false; + } +} + // =================================================================== @@ -1171,7 +1219,7 @@ RowBatch::RowBatch(const RowBatch& from) : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), row_data_(from.row_data_), - hash_values_(from.hash_values_) { + hash_keys_(from.hash_keys_) { _internal_metadata_.MergeFrom(from._internal_metadata_); collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (!from.collection_name().empty()) { @@ -1216,7 +1264,7 @@ void RowBatch::Clear() { (void) cached_has_bits; row_data_.Clear(); - hash_values_.Clear(); + hash_keys_.Clear(); collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); partition_tag_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); @@ -1256,13 +1304,13 @@ const char* RowBatch::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); } else goto handle_unusual; continue; - // repeated int32 hash_values = 4; + // repeated int32 hash_keys = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_hash_values(), ptr, ctx); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_hash_keys(), ptr, ctx); CHK_(ptr); } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32) { - add_hash_values(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + add_hash_keys(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; @@ -1337,16 +1385,16 @@ bool RowBatch::MergePartialFromCodedStream( break; } - // repeated int32 hash_values = 4; + // repeated int32 hash_keys = 4; case 4: { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_hash_values()))); + input, this->mutable_hash_keys()))); } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( - 1, 34u, input, this->mutable_hash_values()))); + 1, 34u, input, this->mutable_hash_keys()))); } else { goto handle_unusual; } @@ -1409,15 +1457,15 @@ void RowBatch::SerializeWithCachedSizes( output); } - // repeated int32 hash_values = 4; - if (this->hash_values_size() > 0) { + // repeated int32 hash_keys = 4; + if (this->hash_keys_size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(4, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_hash_values_cached_byte_size_.load( + output->WriteVarint32(_hash_keys_cached_byte_size_.load( std::memory_order_relaxed)); } - for (int i = 0, n = this->hash_values_size(); i < n; i++) { + for (int i = 0, n = this->hash_keys_size(); i < n; i++) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( - this->hash_values(i), output); + this->hash_keys(i), output); } if (_internal_metadata_.have_unknown_fields()) { @@ -1463,17 +1511,17 @@ void RowBatch::SerializeWithCachedSizes( 3, this->row_data(static_cast(i)), target); } - // repeated int32 hash_values = 4; - if (this->hash_values_size() > 0) { + // repeated int32 hash_keys = 4; + if (this->hash_keys_size() > 0) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( 4, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( - _hash_values_cached_byte_size_.load(std::memory_order_relaxed), + _hash_keys_cached_byte_size_.load(std::memory_order_relaxed), target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->hash_values_, target); + WriteInt32NoTagToArray(this->hash_keys_, target); } if (_internal_metadata_.have_unknown_fields()) { @@ -1508,17 +1556,17 @@ size_t RowBatch::ByteSizeLong() const { } } - // repeated int32 hash_values = 4; + // repeated int32 hash_keys = 4; { size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - Int32Size(this->hash_values_); + Int32Size(this->hash_keys_); 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); - _hash_values_cached_byte_size_.store(cached_size, + _hash_keys_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; } @@ -1565,7 +1613,7 @@ void RowBatch::MergeFrom(const RowBatch& from) { (void) cached_has_bits; row_data_.MergeFrom(from.row_data_); - hash_values_.MergeFrom(from.hash_values_); + hash_keys_.MergeFrom(from.hash_keys_); if (from.collection_name().size() > 0) { collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_); @@ -1598,7 +1646,7 @@ void RowBatch::InternalSwap(RowBatch* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); CastToBase(&row_data_)->InternalSwap(CastToBase(&other->row_data_)); - hash_values_.InternalSwap(&other->hash_values_); + hash_keys_.InternalSwap(&other->hash_keys_); collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); partition_tag_.Swap(&other->partition_tag_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -1610,6 +1658,270 @@ void RowBatch::InternalSwap(RowBatch* other) { } +// =================================================================== + +void VectorValues::InitAsDefaultInstance() { +} +class VectorValues::_Internal { + public: +}; + +void VectorValues::clear_value() { + value_.Clear(); +} +VectorValues::VectorValues() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.proto.service.VectorValues) +} +VectorValues::VectorValues(const VectorValues& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + value_(from.value_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:milvus.proto.service.VectorValues) +} + +void VectorValues::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_VectorValues_service_5fmsg_2eproto.base); +} + +VectorValues::~VectorValues() { + // @@protoc_insertion_point(destructor:milvus.proto.service.VectorValues) + SharedDtor(); +} + +void VectorValues::SharedDtor() { +} + +void VectorValues::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const VectorValues& VectorValues::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_VectorValues_service_5fmsg_2eproto.base); + return *internal_default_instance(); +} + + +void VectorValues::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.proto.service.VectorValues) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + value_.Clear(); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* VectorValues::_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) { + // repeated .milvus.proto.common.Blob value = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_value(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } 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 VectorValues::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.service.VectorValues) + 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)) { + // repeated .milvus.proto.common.Blob value = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_value())); + } 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.service.VectorValues) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.proto.service.VectorValues) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void VectorValues::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.proto.service.VectorValues) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .milvus.proto.common.Blob value = 1; + for (unsigned int i = 0, + n = static_cast(this->value_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, + this->value(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.service.VectorValues) +} + +::PROTOBUF_NAMESPACE_ID::uint8* VectorValues::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.service.VectorValues) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .milvus.proto.common.Blob value = 1; + for (unsigned int i = 0, + n = static_cast(this->value_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, this->value(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.service.VectorValues) + return target; +} + +size_t VectorValues::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.proto.service.VectorValues) + 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.Blob value = 1; + { + unsigned int count = static_cast(this->value_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->value(static_cast(i))); + } + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void VectorValues::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.service.VectorValues) + GOOGLE_DCHECK_NE(&from, this); + const VectorValues* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.service.VectorValues) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.service.VectorValues) + MergeFrom(*source); + } +} + +void VectorValues::MergeFrom(const VectorValues& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.service.VectorValues) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + value_.MergeFrom(from.value_); +} + +void VectorValues::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.service.VectorValues) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VectorValues::CopyFrom(const VectorValues& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.service.VectorValues) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VectorValues::IsInitialized() const { + return true; +} + +void VectorValues::InternalSwap(VectorValues* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&value_)->InternalSwap(CastToBase(&other->value_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata VectorValues::GetMetadata() const { + return GetMetadataStatic(); +} + + // =================================================================== void PlaceholderValue::InitAsDefaultInstance() { @@ -1649,13 +1961,16 @@ PlaceholderValue::PlaceholderValue(const PlaceholderValue& from) } else { value_ = nullptr; } + type_ = from.type_; // @@protoc_insertion_point(copy_constructor:milvus.proto.service.PlaceholderValue) } void PlaceholderValue::SharedCtor() { ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PlaceholderValue_service_5fmsg_2eproto.base); tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - value_ = nullptr; + ::memset(&value_, 0, static_cast( + reinterpret_cast(&type_) - + reinterpret_cast(&value_)) + sizeof(type_)); } PlaceholderValue::~PlaceholderValue() { @@ -1688,6 +2003,7 @@ void PlaceholderValue::Clear() { delete value_; } value_ = nullptr; + type_ = 0; _internal_metadata_.Clear(); } @@ -1706,9 +2022,17 @@ const char* PlaceholderValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA CHK_(ptr); } else goto handle_unusual; continue; - // .milvus.proto.common.Blob value = 2; + // .milvus.proto.service.PlaceholderType type = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + set_type(static_cast<::milvus::proto::service::PlaceholderType>(val)); + } else goto handle_unusual; + continue; + // .milvus.proto.common.Blob value = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { ptr = ctx->ParseMessage(mutable_value(), ptr); CHK_(ptr); } else goto handle_unusual; @@ -1758,9 +2082,23 @@ bool PlaceholderValue::MergePartialFromCodedStream( break; } - // .milvus.proto.common.Blob value = 2; + // .milvus.proto.service.PlaceholderType type = 2; case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { + int value = 0; + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_type(static_cast< ::milvus::proto::service::PlaceholderType >(value)); + } else { + goto handle_unusual; + } + break; + } + + // .milvus.proto.common.Blob value = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_value())); } else { @@ -1806,10 +2144,16 @@ void PlaceholderValue::SerializeWithCachedSizes( 1, this->tag(), output); } - // .milvus.proto.common.Blob value = 2; + // .milvus.proto.service.PlaceholderType type = 2; + if (this->type() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( + 2, this->type(), output); + } + + // .milvus.proto.common.Blob value = 3; if (this->has_value()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, _Internal::value(this), output); + 3, _Internal::value(this), output); } if (_internal_metadata_.have_unknown_fields()) { @@ -1836,11 +2180,17 @@ void PlaceholderValue::SerializeWithCachedSizes( 1, this->tag(), target); } - // .milvus.proto.common.Blob value = 2; + // .milvus.proto.service.PlaceholderType type = 2; + if (this->type() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->type(), target); + } + + // .milvus.proto.common.Blob value = 3; if (this->has_value()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 2, _Internal::value(this), target); + 3, _Internal::value(this), target); } if (_internal_metadata_.have_unknown_fields()) { @@ -1871,13 +2221,19 @@ size_t PlaceholderValue::ByteSizeLong() const { this->tag()); } - // .milvus.proto.common.Blob value = 2; + // .milvus.proto.common.Blob value = 3; if (this->has_value()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *value_); } + // .milvus.proto.service.PlaceholderType type = 2; + if (this->type() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->type()); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1912,6 +2268,9 @@ void PlaceholderValue::MergeFrom(const PlaceholderValue& from) { if (from.has_value()) { mutable_value()->::milvus::proto::common::Blob::MergeFrom(from.value()); } + if (from.type() != 0) { + set_type(from.type()); + } } void PlaceholderValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { @@ -1938,6 +2297,7 @@ void PlaceholderValue::InternalSwap(PlaceholderValue* other) { tag_.Swap(&other->tag_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(value_, other->value_); + swap(type_, other->type_); } ::PROTOBUF_NAMESPACE_ID::Metadata PlaceholderValue::GetMetadata() const { @@ -3743,21 +4103,24 @@ IntegerRangeResponse::IntegerRangeResponse() } IntegerRangeResponse::IntegerRangeResponse(const IntegerRangeResponse& from) : ::PROTOBUF_NAMESPACE_ID::Message(), - _internal_metadata_(nullptr), - begin_(from.begin_), - end_(from.end_) { + _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_status()) { status_ = new ::milvus::proto::common::Status(*from.status_); } else { status_ = nullptr; } + ::memcpy(&begin_, &from.begin_, + static_cast(reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); // @@protoc_insertion_point(copy_constructor:milvus.proto.service.IntegerRangeResponse) } void IntegerRangeResponse::SharedCtor() { ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_IntegerRangeResponse_service_5fmsg_2eproto.base); - status_ = nullptr; + ::memset(&status_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&status_)) + sizeof(end_)); } IntegerRangeResponse::~IntegerRangeResponse() { @@ -3784,12 +4147,13 @@ void IntegerRangeResponse::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - begin_.Clear(); - end_.Clear(); if (GetArenaNoVirtual() == nullptr && status_ != nullptr) { delete status_; } status_ = nullptr; + ::memset(&begin_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); _internal_metadata_.Clear(); } @@ -3808,23 +4172,17 @@ const char* IntegerRangeResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAM CHK_(ptr); } else goto handle_unusual; continue; - // repeated int64 begin = 2; + // int64 begin = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_begin(), ptr, ctx); - CHK_(ptr); - } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { - add_begin(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // repeated int64 end = 3; + // int64 end = 3; case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_end(), ptr, ctx); - CHK_(ptr); - } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) { - add_end(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -3869,32 +4227,26 @@ bool IntegerRangeResponse::MergePartialFromCodedStream( break; } - // repeated int64 begin = 2; + // int64 begin = 2; case 2: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + 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, this->mutable_begin()))); - } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( - 1, 18u, input, this->mutable_begin()))); + input, &begin_))); } else { goto handle_unusual; } break; } - // repeated int64 end = 3; + // int64 end = 3; case 3: { - if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { - DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + 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, this->mutable_end()))); - } 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_end()))); + input, &end_))); } else { goto handle_unusual; } @@ -3934,26 +4286,14 @@ void IntegerRangeResponse::SerializeWithCachedSizes( 1, _Internal::status(this), output); } - // repeated int64 begin = 2; - if (this->begin_size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_begin_cached_byte_size_.load( - std::memory_order_relaxed)); - } - for (int i = 0, n = this->begin_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( - this->begin(i), output); + // int64 begin = 2; + if (this->begin() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->begin(), output); } - // repeated int64 end = 3; - if (this->end_size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(3, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_end_cached_byte_size_.load( - std::memory_order_relaxed)); - } - for (int i = 0, n = this->end_size(); i < n; i++) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( - this->end(i), output); + // int64 end = 3; + if (this->end() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->end(), output); } if (_internal_metadata_.have_unknown_fields()) { @@ -3976,30 +4316,14 @@ void IntegerRangeResponse::SerializeWithCachedSizes( 1, _Internal::status(this), target); } - // repeated int64 begin = 2; - if (this->begin_size() > 0) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( - 2, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( - _begin_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt64NoTagToArray(this->begin_, target); + // int64 begin = 2; + if (this->begin() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->begin(), target); } - // repeated int64 end = 3; - if (this->end_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( - _end_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - WriteInt64NoTagToArray(this->end_, target); + // int64 end = 3; + if (this->end() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->end(), target); } if (_internal_metadata_.have_unknown_fields()) { @@ -4023,36 +4347,6 @@ size_t IntegerRangeResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated int64 begin = 2; - { - size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - Int64Size(this->begin_); - 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); - _begin_cached_byte_size_.store(cached_size, - std::memory_order_relaxed); - total_size += data_size; - } - - // repeated int64 end = 3; - { - size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - Int64Size(this->end_); - 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); - _end_cached_byte_size_.store(cached_size, - std::memory_order_relaxed); - total_size += data_size; - } - // .milvus.proto.common.Status status = 1; if (this->has_status()) { total_size += 1 + @@ -4060,6 +4354,20 @@ size_t IntegerRangeResponse::ByteSizeLong() const { *status_); } + // int64 begin = 2; + if (this->begin() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->begin()); + } + + // int64 end = 3; + if (this->end() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->end()); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -4087,11 +4395,15 @@ void IntegerRangeResponse::MergeFrom(const IntegerRangeResponse& from) { ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - begin_.MergeFrom(from.begin_); - end_.MergeFrom(from.end_); if (from.has_status()) { mutable_status()->::milvus::proto::common::Status::MergeFrom(from.status()); } + if (from.begin() != 0) { + set_begin(from.begin()); + } + if (from.end() != 0) { + set_end(from.end()); + } } void IntegerRangeResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { @@ -4115,9 +4427,9 @@ bool IntegerRangeResponse::IsInitialized() const { void IntegerRangeResponse::InternalSwap(IntegerRangeResponse* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - begin_.InternalSwap(&other->begin_); - end_.InternalSwap(&other->end_); swap(status_, other->status_); + swap(begin_, other->begin_); + swap(end_, other->end_); } ::PROTOBUF_NAMESPACE_ID::Metadata IntegerRangeResponse::GetMetadata() const { @@ -5978,6 +6290,9 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::service::PartitionName* Arena::Cre template<> PROTOBUF_NOINLINE ::milvus::proto::service::RowBatch* Arena::CreateMaybeMessage< ::milvus::proto::service::RowBatch >(Arena* arena) { return Arena::CreateInternal< ::milvus::proto::service::RowBatch >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::proto::service::VectorValues* Arena::CreateMaybeMessage< ::milvus::proto::service::VectorValues >(Arena* arena) { + return Arena::CreateInternal< ::milvus::proto::service::VectorValues >(arena); +} template<> PROTOBUF_NOINLINE ::milvus::proto::service::PlaceholderValue* Arena::CreateMaybeMessage< ::milvus::proto::service::PlaceholderValue >(Arena* arena) { return Arena::CreateInternal< ::milvus::proto::service::PlaceholderValue >(arena); } diff --git a/internal/core/src/pb/service_msg.pb.h b/internal/core/src/pb/service_msg.pb.h index 71605435a1..ff0734a274 100644 --- a/internal/core/src/pb/service_msg.pb.h +++ b/internal/core/src/pb/service_msg.pb.h @@ -31,6 +31,7 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include #include #include "common.pb.h" #include "schema.pb.h" @@ -49,7 +50,7 @@ struct TableStruct_service_5fmsg_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[15] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[16] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; @@ -104,6 +105,9 @@ extern StringListResponseDefaultTypeInternal _StringListResponse_default_instanc class StringResponse; class StringResponseDefaultTypeInternal; extern StringResponseDefaultTypeInternal _StringResponse_default_instance_; +class VectorValues; +class VectorValuesDefaultTypeInternal; +extern VectorValuesDefaultTypeInternal _VectorValues_default_instance_; } // namespace service } // namespace proto } // namespace milvus @@ -123,11 +127,38 @@ template<> ::milvus::proto::service::RowBatch* Arena::CreateMaybeMessage<::milvu template<> ::milvus::proto::service::Score* Arena::CreateMaybeMessage<::milvus::proto::service::Score>(Arena*); template<> ::milvus::proto::service::StringListResponse* Arena::CreateMaybeMessage<::milvus::proto::service::StringListResponse>(Arena*); template<> ::milvus::proto::service::StringResponse* Arena::CreateMaybeMessage<::milvus::proto::service::StringResponse>(Arena*); +template<> ::milvus::proto::service::VectorValues* Arena::CreateMaybeMessage<::milvus::proto::service::VectorValues>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace milvus { namespace proto { namespace service { +enum PlaceholderType : int { + NONE = 0, + VECTOR_BINARY = 100, + VECTOR_FLOAT = 101, + PlaceholderType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + PlaceholderType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool PlaceholderType_IsValid(int value); +constexpr PlaceholderType PlaceholderType_MIN = NONE; +constexpr PlaceholderType PlaceholderType_MAX = VECTOR_FLOAT; +constexpr int PlaceholderType_ARRAYSIZE = PlaceholderType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceholderType_descriptor(); +template +inline const std::string& PlaceholderType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PlaceholderType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + PlaceholderType_descriptor(), enum_t_value); +} +inline bool PlaceholderType_Parse( + const std::string& name, PlaceholderType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + PlaceholderType_descriptor(), name, value); +} // =================================================================== class CollectionName : @@ -531,7 +562,7 @@ class RowBatch : enum : int { kRowDataFieldNumber = 3, - kHashValuesFieldNumber = 4, + kHashKeysFieldNumber = 4, kCollectionNameFieldNumber = 1, kPartitionTagFieldNumber = 2, }; @@ -546,16 +577,16 @@ class RowBatch : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::Blob >& row_data() const; - // repeated int32 hash_values = 4; - int hash_values_size() const; - void clear_hash_values(); - ::PROTOBUF_NAMESPACE_ID::int32 hash_values(int index) const; - void set_hash_values(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); - void add_hash_values(::PROTOBUF_NAMESPACE_ID::int32 value); + // repeated int32 hash_keys = 4; + int hash_keys_size() const; + void clear_hash_keys(); + ::PROTOBUF_NAMESPACE_ID::int32 hash_keys(int index) const; + void set_hash_keys(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_hash_keys(::PROTOBUF_NAMESPACE_ID::int32 value); const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& - hash_values() const; + hash_keys() const; ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* - mutable_hash_values(); + mutable_hash_keys(); // string collection_name = 1; void clear_collection_name(); @@ -585,8 +616,8 @@ class RowBatch : ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::Blob > row_data_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > hash_values_; - mutable std::atomic _hash_values_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > hash_keys_; + mutable std::atomic _hash_keys_cached_byte_size_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr collection_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partition_tag_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -594,6 +625,143 @@ class RowBatch : }; // ------------------------------------------------------------------- +class VectorValues : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.service.VectorValues) */ { + public: + VectorValues(); + virtual ~VectorValues(); + + VectorValues(const VectorValues& from); + VectorValues(VectorValues&& from) noexcept + : VectorValues() { + *this = ::std::move(from); + } + + inline VectorValues& operator=(const VectorValues& from) { + CopyFrom(from); + return *this; + } + inline VectorValues& operator=(VectorValues&& 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 VectorValues& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const VectorValues* internal_default_instance() { + return reinterpret_cast( + &_VectorValues_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(VectorValues& a, VectorValues& b) { + a.Swap(&b); + } + inline void Swap(VectorValues* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline VectorValues* New() const final { + return CreateMaybeMessage(nullptr); + } + + VectorValues* 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 VectorValues& from); + void MergeFrom(const VectorValues& 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(VectorValues* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.proto.service.VectorValues"; + } + 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_service_5fmsg_2eproto); + return ::descriptor_table_service_5fmsg_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 1, + }; + // repeated .milvus.proto.common.Blob value = 1; + int value_size() const; + void clear_value(); + ::milvus::proto::common::Blob* mutable_value(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::Blob >* + mutable_value(); + const ::milvus::proto::common::Blob& value(int index) const; + ::milvus::proto::common::Blob* add_value(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::Blob >& + value() const; + + // @@protoc_insertion_point(class_scope:milvus.proto.service.VectorValues) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::Blob > value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_service_5fmsg_2eproto; +}; +// ------------------------------------------------------------------- + class PlaceholderValue : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.service.PlaceholderValue) */ { public: @@ -636,7 +804,7 @@ class PlaceholderValue : &_PlaceholderValue_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 4; friend void swap(PlaceholderValue& a, PlaceholderValue& b) { a.Swap(&b); @@ -708,7 +876,8 @@ class PlaceholderValue : enum : int { kTagFieldNumber = 1, - kValueFieldNumber = 2, + kValueFieldNumber = 3, + kTypeFieldNumber = 2, }; // string tag = 1; void clear_tag(); @@ -721,7 +890,7 @@ class PlaceholderValue : std::string* release_tag(); void set_allocated_tag(std::string* tag); - // .milvus.proto.common.Blob value = 2; + // .milvus.proto.common.Blob value = 3; bool has_value() const; void clear_value(); const ::milvus::proto::common::Blob& value() const; @@ -729,6 +898,11 @@ class PlaceholderValue : ::milvus::proto::common::Blob* mutable_value(); void set_allocated_value(::milvus::proto::common::Blob* value); + // .milvus.proto.service.PlaceholderType type = 2; + void clear_type(); + ::milvus::proto::service::PlaceholderType type() const; + void set_type(::milvus::proto::service::PlaceholderType value); + // @@protoc_insertion_point(class_scope:milvus.proto.service.PlaceholderValue) private: class _Internal; @@ -736,6 +910,7 @@ class PlaceholderValue : ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tag_; ::milvus::proto::common::Blob* value_; + int type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_service_5fmsg_2eproto; }; @@ -783,7 +958,7 @@ class Query : &_Query_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; friend void swap(Query& a, Query& b) { a.Swap(&b); @@ -965,7 +1140,7 @@ class StringResponse : &_StringResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; friend void swap(StringResponse& a, StringResponse& b) { a.Swap(&b); @@ -1112,7 +1287,7 @@ class BoolResponse : &_BoolResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; friend void swap(BoolResponse& a, BoolResponse& b) { a.Swap(&b); @@ -1253,7 +1428,7 @@ class StringListResponse : &_StringListResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 8; friend void swap(StringListResponse& a, StringListResponse& b) { a.Swap(&b); @@ -1406,7 +1581,7 @@ class IntegerListResponse : &_IntegerListResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 9; friend void swap(IntegerListResponse& a, IntegerListResponse& b) { a.Swap(&b); @@ -1554,7 +1729,7 @@ class IntegerRangeResponse : &_IntegerRangeResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 10; friend void swap(IntegerRangeResponse& a, IntegerRangeResponse& b) { a.Swap(&b); @@ -1625,32 +1800,10 @@ class IntegerRangeResponse : // accessors ------------------------------------------------------- enum : int { + kStatusFieldNumber = 1, kBeginFieldNumber = 2, kEndFieldNumber = 3, - kStatusFieldNumber = 1, }; - // repeated int64 begin = 2; - int begin_size() const; - void clear_begin(); - ::PROTOBUF_NAMESPACE_ID::int64 begin(int index) const; - void set_begin(int index, ::PROTOBUF_NAMESPACE_ID::int64 value); - void add_begin(::PROTOBUF_NAMESPACE_ID::int64 value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& - begin() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* - mutable_begin(); - - // repeated int64 end = 3; - int end_size() const; - void clear_end(); - ::PROTOBUF_NAMESPACE_ID::int64 end(int index) const; - void set_end(int index, ::PROTOBUF_NAMESPACE_ID::int64 value); - void add_end(::PROTOBUF_NAMESPACE_ID::int64 value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& - end() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* - mutable_end(); - // .milvus.proto.common.Status status = 1; bool has_status() const; void clear_status(); @@ -1659,16 +1812,24 @@ class IntegerRangeResponse : ::milvus::proto::common::Status* mutable_status(); void set_allocated_status(::milvus::proto::common::Status* status); + // int64 begin = 2; + void clear_begin(); + ::PROTOBUF_NAMESPACE_ID::int64 begin() const; + void set_begin(::PROTOBUF_NAMESPACE_ID::int64 value); + + // int64 end = 3; + void clear_end(); + ::PROTOBUF_NAMESPACE_ID::int64 end() const; + void set_end(::PROTOBUF_NAMESPACE_ID::int64 value); + // @@protoc_insertion_point(class_scope:milvus.proto.service.IntegerRangeResponse) private: class _Internal; ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > begin_; - mutable std::atomic _begin_cached_byte_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > end_; - mutable std::atomic _end_cached_byte_size_; ::milvus::proto::common::Status* status_; + ::PROTOBUF_NAMESPACE_ID::int64 begin_; + ::PROTOBUF_NAMESPACE_ID::int64 end_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_service_5fmsg_2eproto; }; @@ -1716,7 +1877,7 @@ class CollectionDescription : &_CollectionDescription_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 11; friend void swap(CollectionDescription& a, CollectionDescription& b) { a.Swap(&b); @@ -1873,7 +2034,7 @@ class PartitionDescription : &_PartitionDescription_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 12; friend void swap(PartitionDescription& a, PartitionDescription& b) { a.Swap(&b); @@ -2030,7 +2191,7 @@ class Score : &_Score_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 13; friend void swap(Score& a, Score& b) { a.Swap(&b); @@ -2181,7 +2342,7 @@ class Hits : &_Hits_default_instance_); } static constexpr int kIndexInFileMessages = - 13; + 14; friend void swap(Hits& a, Hits& b) { a.Swap(&b); @@ -2345,7 +2506,7 @@ class QueryResult : &_QueryResult_default_instance_); } static constexpr int kIndexInFileMessages = - 14; + 15; friend void swap(QueryResult& a, QueryResult& b) { a.Swap(&b); @@ -2749,34 +2910,65 @@ RowBatch::row_data() const { return row_data_; } -// repeated int32 hash_values = 4; -inline int RowBatch::hash_values_size() const { - return hash_values_.size(); +// repeated int32 hash_keys = 4; +inline int RowBatch::hash_keys_size() const { + return hash_keys_.size(); } -inline void RowBatch::clear_hash_values() { - hash_values_.Clear(); +inline void RowBatch::clear_hash_keys() { + hash_keys_.Clear(); } -inline ::PROTOBUF_NAMESPACE_ID::int32 RowBatch::hash_values(int index) const { - // @@protoc_insertion_point(field_get:milvus.proto.service.RowBatch.hash_values) - return hash_values_.Get(index); +inline ::PROTOBUF_NAMESPACE_ID::int32 RowBatch::hash_keys(int index) const { + // @@protoc_insertion_point(field_get:milvus.proto.service.RowBatch.hash_keys) + return hash_keys_.Get(index); } -inline void RowBatch::set_hash_values(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { - hash_values_.Set(index, value); - // @@protoc_insertion_point(field_set:milvus.proto.service.RowBatch.hash_values) +inline void RowBatch::set_hash_keys(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { + hash_keys_.Set(index, value); + // @@protoc_insertion_point(field_set:milvus.proto.service.RowBatch.hash_keys) } -inline void RowBatch::add_hash_values(::PROTOBUF_NAMESPACE_ID::int32 value) { - hash_values_.Add(value); - // @@protoc_insertion_point(field_add:milvus.proto.service.RowBatch.hash_values) +inline void RowBatch::add_hash_keys(::PROTOBUF_NAMESPACE_ID::int32 value) { + hash_keys_.Add(value); + // @@protoc_insertion_point(field_add:milvus.proto.service.RowBatch.hash_keys) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& -RowBatch::hash_values() const { - // @@protoc_insertion_point(field_list:milvus.proto.service.RowBatch.hash_values) - return hash_values_; +RowBatch::hash_keys() const { + // @@protoc_insertion_point(field_list:milvus.proto.service.RowBatch.hash_keys) + return hash_keys_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* -RowBatch::mutable_hash_values() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.service.RowBatch.hash_values) - return &hash_values_; +RowBatch::mutable_hash_keys() { + // @@protoc_insertion_point(field_mutable_list:milvus.proto.service.RowBatch.hash_keys) + return &hash_keys_; +} + +// ------------------------------------------------------------------- + +// VectorValues + +// repeated .milvus.proto.common.Blob value = 1; +inline int VectorValues::value_size() const { + return value_.size(); +} +inline ::milvus::proto::common::Blob* VectorValues::mutable_value(int index) { + // @@protoc_insertion_point(field_mutable:milvus.proto.service.VectorValues.value) + return value_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::Blob >* +VectorValues::mutable_value() { + // @@protoc_insertion_point(field_mutable_list:milvus.proto.service.VectorValues.value) + return &value_; +} +inline const ::milvus::proto::common::Blob& VectorValues::value(int index) const { + // @@protoc_insertion_point(field_get:milvus.proto.service.VectorValues.value) + return value_.Get(index); +} +inline ::milvus::proto::common::Blob* VectorValues::add_value() { + // @@protoc_insertion_point(field_add:milvus.proto.service.VectorValues.value) + return value_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::common::Blob >& +VectorValues::value() const { + // @@protoc_insertion_point(field_list:milvus.proto.service.VectorValues.value) + return value_; } // ------------------------------------------------------------------- @@ -2834,7 +3026,21 @@ inline void PlaceholderValue::set_allocated_tag(std::string* tag) { // @@protoc_insertion_point(field_set_allocated:milvus.proto.service.PlaceholderValue.tag) } -// .milvus.proto.common.Blob value = 2; +// .milvus.proto.service.PlaceholderType type = 2; +inline void PlaceholderValue::clear_type() { + type_ = 0; +} +inline ::milvus::proto::service::PlaceholderType PlaceholderValue::type() const { + // @@protoc_insertion_point(field_get:milvus.proto.service.PlaceholderValue.type) + return static_cast< ::milvus::proto::service::PlaceholderType >(type_); +} +inline void PlaceholderValue::set_type(::milvus::proto::service::PlaceholderType value) { + + type_ = value; + // @@protoc_insertion_point(field_set:milvus.proto.service.PlaceholderValue.type) +} + +// .milvus.proto.common.Blob value = 3; inline bool PlaceholderValue::has_value() const { return this != internal_default_instance() && value_ != nullptr; } @@ -3485,64 +3691,32 @@ inline void IntegerRangeResponse::set_allocated_status(::milvus::proto::common:: // @@protoc_insertion_point(field_set_allocated:milvus.proto.service.IntegerRangeResponse.status) } -// repeated int64 begin = 2; -inline int IntegerRangeResponse::begin_size() const { - return begin_.size(); -} +// int64 begin = 2; inline void IntegerRangeResponse::clear_begin() { - begin_.Clear(); + begin_ = PROTOBUF_LONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::int64 IntegerRangeResponse::begin(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int64 IntegerRangeResponse::begin() const { // @@protoc_insertion_point(field_get:milvus.proto.service.IntegerRangeResponse.begin) - return begin_.Get(index); -} -inline void IntegerRangeResponse::set_begin(int index, ::PROTOBUF_NAMESPACE_ID::int64 value) { - begin_.Set(index, value); - // @@protoc_insertion_point(field_set:milvus.proto.service.IntegerRangeResponse.begin) -} -inline void IntegerRangeResponse::add_begin(::PROTOBUF_NAMESPACE_ID::int64 value) { - begin_.Add(value); - // @@protoc_insertion_point(field_add:milvus.proto.service.IntegerRangeResponse.begin) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& -IntegerRangeResponse::begin() const { - // @@protoc_insertion_point(field_list:milvus.proto.service.IntegerRangeResponse.begin) return begin_; } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* -IntegerRangeResponse::mutable_begin() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.service.IntegerRangeResponse.begin) - return &begin_; +inline void IntegerRangeResponse::set_begin(::PROTOBUF_NAMESPACE_ID::int64 value) { + + begin_ = value; + // @@protoc_insertion_point(field_set:milvus.proto.service.IntegerRangeResponse.begin) } -// repeated int64 end = 3; -inline int IntegerRangeResponse::end_size() const { - return end_.size(); -} +// int64 end = 3; inline void IntegerRangeResponse::clear_end() { - end_.Clear(); + end_ = PROTOBUF_LONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::int64 IntegerRangeResponse::end(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int64 IntegerRangeResponse::end() const { // @@protoc_insertion_point(field_get:milvus.proto.service.IntegerRangeResponse.end) - return end_.Get(index); -} -inline void IntegerRangeResponse::set_end(int index, ::PROTOBUF_NAMESPACE_ID::int64 value) { - end_.Set(index, value); - // @@protoc_insertion_point(field_set:milvus.proto.service.IntegerRangeResponse.end) -} -inline void IntegerRangeResponse::add_end(::PROTOBUF_NAMESPACE_ID::int64 value) { - end_.Add(value); - // @@protoc_insertion_point(field_add:milvus.proto.service.IntegerRangeResponse.end) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& -IntegerRangeResponse::end() const { - // @@protoc_insertion_point(field_list:milvus.proto.service.IntegerRangeResponse.end) return end_; } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* -IntegerRangeResponse::mutable_end() { - // @@protoc_insertion_point(field_mutable_list:milvus.proto.service.IntegerRangeResponse.end) - return &end_; +inline void IntegerRangeResponse::set_end(::PROTOBUF_NAMESPACE_ID::int64 value) { + + end_ = value; + // @@protoc_insertion_point(field_set:milvus.proto.service.IntegerRangeResponse.end) } // ------------------------------------------------------------------- @@ -4079,6 +4253,8 @@ QueryResult::hits() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) @@ -4086,6 +4262,16 @@ QueryResult::hits() const { } // namespace proto } // namespace milvus +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::milvus::proto::service::PlaceholderType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::milvus::proto::service::PlaceholderType>() { + return ::milvus::proto::service::PlaceholderType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + // @@protoc_insertion_point(global_scope) #include diff --git a/internal/core/ubuntu_build_deps.sh b/internal/core/ubuntu_build_deps.sh index 44bf2c4e52..4dc95e6069 100755 --- a/internal/core/ubuntu_build_deps.sh +++ b/internal/core/ubuntu_build_deps.sh @@ -1,3 +1,3 @@ #!/bin/bash -sudo apt-get install libtbb-dev +sudo apt-get install libtbb-dev libopenblas-dev libopenblas-base diff --git a/internal/msgstream/marshaler.go b/internal/msgstream/marshaler.go index aa9d4153a2..632f39a78c 100644 --- a/internal/msgstream/marshaler.go +++ b/internal/msgstream/marshaler.go @@ -59,7 +59,7 @@ func (im *InsertMarshaler) Marshal(input *TsMsg) ([]byte, commonPb.Status) { func (im *InsertMarshaler) Unmarshal(input []byte) (*TsMsg, commonPb.Status) { insertRequest := internalPb.InsertRequest{} err := proto.Unmarshal(input, &insertRequest) - insertTask := InsertTask{insertRequest} + insertTask := InsertTask{InsertRequest:insertRequest} if err != nil { return nil, commonPb.Status{ErrorCode: commonPb.ErrorCode_UNEXPECTED_ERROR} @@ -85,7 +85,7 @@ func (dm *DeleteMarshaler) Marshal(input *TsMsg) ([]byte, commonPb.Status) { func (dm *DeleteMarshaler) Unmarshal(input []byte) (*TsMsg, commonPb.Status) { deleteRequest := internalPb.DeleteRequest{} err := proto.Unmarshal(input, &deleteRequest) - deleteTask := DeleteTask{deleteRequest} + deleteTask := DeleteTask{DeleteRequest:deleteRequest} if err != nil { return nil, commonPb.Status{ErrorCode: commonPb.ErrorCode_UNEXPECTED_ERROR} } @@ -110,7 +110,7 @@ func (sm *SearchMarshaler) Marshal(input *TsMsg) ([]byte, commonPb.Status) { func (sm *SearchMarshaler) Unmarshal(input []byte) (*TsMsg, commonPb.Status) { searchRequest := internalPb.SearchRequest{} err := proto.Unmarshal(input, &searchRequest) - searchTask := SearchTask{searchRequest} + searchTask := SearchTask{SearchRequest: searchRequest} if err != nil { return nil, commonPb.Status{ErrorCode: commonPb.ErrorCode_UNEXPECTED_ERROR} } @@ -135,7 +135,7 @@ func (srm *SearchResultMarshaler) Marshal(input *TsMsg) ([]byte, commonPb.Status func (srm *SearchResultMarshaler) Unmarshal(input []byte) (*TsMsg, commonPb.Status) { searchResult := internalPb.SearchResult{} err := proto.Unmarshal(input, &searchResult) - searchResultTask := SearchResultTask{searchResult} + searchResultTask := SearchResultTask{SearchResult: searchResult} if err != nil { return nil, commonPb.Status{ErrorCode: commonPb.ErrorCode_UNEXPECTED_ERROR} } @@ -160,7 +160,7 @@ func (tm *TimeSyncMarshaler) Marshal(input *TsMsg) ([]byte, commonPb.Status) { func (tm *TimeSyncMarshaler) Unmarshal(input []byte) (*TsMsg, commonPb.Status) { timeSyncMsg := internalPb.TimeSyncMsg{} err := proto.Unmarshal(input, &timeSyncMsg) - timeSyncTask := TimeSyncTask{timeSyncMsg} + timeSyncTask := TimeSyncTask{TimeSyncMsg:timeSyncMsg} if err != nil { return nil, commonPb.Status{ErrorCode: commonPb.ErrorCode_UNEXPECTED_ERROR} } diff --git a/internal/msgstream/msgstream.go b/internal/msgstream/msgstream.go index 29967bc084..0611b90a20 100644 --- a/internal/msgstream/msgstream.go +++ b/internal/msgstream/msgstream.go @@ -2,35 +2,40 @@ package msgstream import ( "context" + "fmt" "github.com/apache/pulsar-client-go/pulsar" commonPb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "log" "sync" ) -const PulsarChannelLength = 100 - -type TimeStamp uint64 +type Timestamp uint64 type MsgPack struct { - BeginTs TimeStamp - EndTs TimeStamp + BeginTs Timestamp + EndTs Timestamp Msgs []*TsMsg } -type HashFunc func(*MsgPack) map[uint32]*MsgPack +type RepackFunc func(msgs []*TsMsg, hashKeys [][]int32) map[int32]*MsgPack type MsgStream interface { + Start() + Close() + + SetRepackFunc(repackFunc RepackFunc) SetMsgMarshaler(marshal *TsMsgMarshaler, unmarshal *TsMsgMarshaler) Produce(*MsgPack) commonPb.Status Consume() *MsgPack // message can be consumed exactly once } type PulsarMsgStream struct { - client *pulsar.Client - producers []*pulsar.Producer - consumers []*pulsar.Consumer - msgHashFunc HashFunc // return a map from produceChannel idx to *MsgPack + client *pulsar.Client + producers []*pulsar.Producer + consumers []*pulsar.Consumer + repackFunc RepackFunc // return a map from produceChannel idx to *MsgPack + + receiveBuf chan *MsgPack msgMarshaler *TsMsgMarshaler msgUnmarshaler *TsMsgMarshaler @@ -56,9 +61,9 @@ func (ms *PulsarMsgStream) SetProducers(channels []string) { } } -func (ms *PulsarMsgStream) SetConsumers(channels []string, subName string) { +func (ms *PulsarMsgStream) SetConsumers(channels []string, subName string, pulsarBufSize int64) { for i := 0; i < len(channels); i++ { - receiveChannel := make(chan pulsar.ConsumerMessage, PulsarChannelLength) + receiveChannel := make(chan pulsar.ConsumerMessage, pulsarBufSize) pc, err := (*ms.client).Subscribe(pulsar.ConsumerOptions{ Topic: channels[i], SubscriptionName: subName, @@ -78,27 +83,52 @@ func (ms *PulsarMsgStream) SetMsgMarshaler(marshal *TsMsgMarshaler, unmarshal *T ms.msgUnmarshaler = unmarshal } -func (ms *PulsarMsgStream) SetHashFunc(hashFunc HashFunc) { - ms.msgHashFunc = func(pack *MsgPack) map[uint32]*MsgPack { - hashResult := hashFunc(pack) - bucketResult := make(map[uint32]*MsgPack) - for k, v := range hashResult { - channelIndex := k % uint32(len(ms.producers)) - _, ok := bucketResult[channelIndex] - if ok == false { - msgPack := MsgPack{} - bucketResult[channelIndex] = &msgPack - } - for _, msg := range v.Msgs { - bucketResult[channelIndex].Msgs = append(bucketResult[channelIndex].Msgs, msg) - } +func (ms *PulsarMsgStream) SetRepackFunc(repackFunc RepackFunc) { + ms.repackFunc = repackFunc +} + +func (ms *PulsarMsgStream) Start(){ + go ms.bufMsgPackToChannel() +} + +func (ms *PulsarMsgStream) Close() { + for _, producer := range ms.producers { + if producer != nil { + (*producer).Close() } - return bucketResult + } + for _, consumer := range ms.consumers { + if consumer != nil { + (*consumer).Close() + } + } + if ms.client != nil { + (*ms.client).Close() } } -func (ms *PulsarMsgStream) Produce(msg *MsgPack) commonPb.Status { - result := ms.msgHashFunc(msg) +func (ms *PulsarMsgStream) InitMsgPackBuf(msgPackBufSize int64) { + ms.receiveBuf = make(chan *MsgPack, msgPackBufSize) +} + + +func (ms *PulsarMsgStream) Produce(msgPack *MsgPack) commonPb.Status { + tsMsgs := msgPack.Msgs + if len(tsMsgs) <=0 { + log.Println("receive empty msgPack") + return commonPb.Status{ErrorCode: commonPb.ErrorCode_SUCCESS} + } + reBucketValues := make([][]int32, len(tsMsgs)) + for channelId, tsMsg := range tsMsgs { + hashValues := (*tsMsg).HashKeys() + bucketValues := make([]int32, len(hashValues)) + for index, hashValue := range hashValues { + bucketValues[index] = hashValue % int32(len(ms.producers)) + } + reBucketValues[channelId] = bucketValues + } + + result := ms.repackFunc(tsMsgs, reBucketValues) for k, v := range result { for i := 0; i < len(v.Msgs); i++ { mb, status := (*ms.msgMarshaler).Marshal(v.Msgs[i]) @@ -112,30 +142,53 @@ func (ms *PulsarMsgStream) Produce(msg *MsgPack) commonPb.Status { ); err != nil { log.Printf("post into pulsar filed, error = %v", err) } + fmt.Println("send a msg") } } return commonPb.Status{ErrorCode: commonPb.ErrorCode_SUCCESS} } + func (ms *PulsarMsgStream) Consume() *MsgPack { - tsMsgList := make([]*TsMsg, 0) - for i := 0; i < len(ms.consumers); i++ { - pulsarMsg, ok := <-(*ms.consumers[i]).Chan() - if ok == false { - log.Fatal("consumer closed!") - continue + ctx := context.Background() + for { + select { + case cm, ok := <-ms.receiveBuf: + if !ok { + log.Println("buf chan closed") + return nil + } + return cm + case <-ctx.Done(): + return nil } - (*ms.consumers[i]).AckID(pulsarMsg.ID()) - tsMsg, status := (*ms.msgUnmarshaler).Unmarshal(pulsarMsg.Payload()) - if status.ErrorCode != commonPb.ErrorCode_SUCCESS { - log.Printf("Marshal ManipulationReqMsg failed, error ") - } - tsMsgList = append(tsMsgList, tsMsg) - } +} - msgPack := MsgPack{Msgs: tsMsgList} - return &msgPack +func (ms *PulsarMsgStream) bufMsgPackToChannel() { + tsMsgList := make([]*TsMsg, 0) + for { + for i := 0; i < len(ms.consumers); i++ { + consumerChan := (*ms.consumers[i]).Chan() + chanLen := len(consumerChan) + for l := 0; l < chanLen; l++ { + pulsarMsg, ok := <-consumerChan + if ok == false { + log.Printf("channel closed") + } + (*ms.consumers[i]).AckID(pulsarMsg.ID()) + tsMsg, status := (*ms.msgUnmarshaler).Unmarshal(pulsarMsg.Payload()) + if status.ErrorCode != commonPb.ErrorCode_SUCCESS { + log.Printf("Marshal ManipulationReqMsg failed, error ") + } + tsMsgList = append(tsMsgList, tsMsg) + } + } + if len(tsMsgList) > 0 { + msgPack := MsgPack{Msgs: tsMsgList} + ms.receiveBuf <- &msgPack + } + } } type PulsarTtMsgStream struct { @@ -143,13 +196,17 @@ type PulsarTtMsgStream struct { inputBuf []*TsMsg unsolvedBuf []*TsMsg msgPacks []*MsgPack - lastTimeStamp TimeStamp + lastTimeStamp Timestamp } -func (ms *PulsarTtMsgStream) Consume() *MsgPack { //return messages in one time tick +func (ms *PulsarTtMsgStream) Start(){ + go ms.bufMsgPackToChannel() +} + +func (ms *PulsarTtMsgStream) bufMsgPackToChannel() { wg := sync.WaitGroup{} wg.Add(len(ms.consumers)) - eofMsgTimeStamp := make(map[int]TimeStamp) + eofMsgTimeStamp := make(map[int]Timestamp) mu := sync.Mutex{} for i := 0; i < len(ms.consumers); i++ { go ms.findTimeTick(context.Background(), i, eofMsgTimeStamp, &wg, &mu) @@ -161,12 +218,10 @@ func (ms *PulsarTtMsgStream) Consume() *MsgPack { //return messages in one time } timeTickBuf := make([]*TsMsg, 0) - for _, v := range ms.unsolvedBuf { - ms.inputBuf = append(ms.inputBuf, v) - } + ms.inputBuf = append(ms.inputBuf, ms.unsolvedBuf...) ms.unsolvedBuf = ms.unsolvedBuf[:0] for _, v := range ms.inputBuf { - if (*v).Ts() >= timeStamp { + if (*v).EndTs() >= timeStamp { timeTickBuf = append(timeTickBuf, v) } else { ms.unsolvedBuf = append(ms.unsolvedBuf, v) @@ -180,12 +235,12 @@ func (ms *PulsarTtMsgStream) Consume() *MsgPack { //return messages in one time Msgs: timeTickBuf, } - return &msgPack + ms.receiveBuf <- &msgPack } func (ms *PulsarTtMsgStream) findTimeTick(ctx context.Context, channelIndex int, - eofMsgMap map[int]TimeStamp, + eofMsgMap map[int]Timestamp, wg *sync.WaitGroup, mu *sync.Mutex) { for { @@ -200,9 +255,10 @@ func (ms *PulsarTtMsgStream) findTimeTick(ctx context.Context, (*ms.consumers[channelIndex]).Ack(pulsarMsg) tsMsg, status := (*ms.msgUnmarshaler).Unmarshal(pulsarMsg.Payload()) // TODO:: Find the EOF - if (*tsMsg).Type() == kTimeTick { - eofMsgMap[channelIndex] = (*tsMsg).Ts() - break + if (*tsMsg).Type() == kTimeSync { + eofMsgMap[channelIndex] = (*tsMsg).EndTs() + wg.Done() + return } if status.ErrorCode != commonPb.ErrorCode_SUCCESS { log.Printf("Marshal ManipulationReqMsg failed, error ") @@ -212,11 +268,10 @@ func (ms *PulsarTtMsgStream) findTimeTick(ctx context.Context, mu.Unlock() } } - wg.Done() } -func checkTimeTickMsg(msg map[int]TimeStamp) (TimeStamp, bool) { - checkMap := make(map[TimeStamp]int) +func checkTimeTickMsg(msg map[int]Timestamp) (Timestamp, bool) { + checkMap := make(map[Timestamp]int) for _, v := range msg { checkMap[v] += 1 } diff --git a/internal/msgstream/msgstream_test.go b/internal/msgstream/msgstream_test.go new file mode 100644 index 0000000000..a06394c745 --- /dev/null +++ b/internal/msgstream/msgstream_test.go @@ -0,0 +1,213 @@ +package msgstream + +import ( + "fmt" + commonPb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb" + internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb" + "testing" +) + +func repackFunc(msgs []*TsMsg, hashKeys [][]int32) map[int32]*MsgPack { + result := make(map[int32]*MsgPack) + for i, request := range msgs { + keys := hashKeys[i] + for _, channelId := range keys { + _, ok := result[channelId] + if ok == false { + msgPack := MsgPack{} + result[channelId] = &msgPack + } + result[channelId].Msgs = append(result[channelId].Msgs, request) + } + } + return result +} + +func getTsMsg(msgType MsgType, reqId int64, hashValue int32) *TsMsg { + var tsMsg TsMsg + switch msgType { + case kInsert: + insertRequest := internalPb.InsertRequest{ + ReqType: internalPb.ReqType_kInsert, + ReqId: reqId, + CollectionName: "Collection", + PartitionTag: "Partition", + SegmentId: 1, + ChannelId: 1, + ProxyId: 1, + Timestamps: []uint64{1}, + } + insertMsg := InsertTask{ + HashValues: []int32{hashValue}, + InsertRequest: insertRequest, + } + tsMsg = insertMsg + case kDelete: + deleteRequest := internalPb.DeleteRequest{ + ReqType: internalPb.ReqType_kDelete, + ReqId: reqId, + CollectionName: "Collection", + ChannelId: 1, + ProxyId: 1, + Timestamps: []uint64{1}, + PrimaryKeys: []int64{1}, + } + deleteMsg := DeleteTask{ + HashValues: []int32{hashValue}, + DeleteRequest: deleteRequest, + } + tsMsg = deleteMsg + case kSearch: + searchRequest := internalPb.SearchRequest{ + ReqType: internalPb.ReqType_kSearch, + ReqId: reqId, + ProxyId: 1, + Timestamp: 1, + ResultChannelId: 1, + } + searchMsg := SearchTask{ + HashValues: []int32{hashValue}, + SearchRequest: searchRequest, + } + tsMsg = searchMsg + case kSearchResult: + searchResult := internalPb.SearchResult{ + Status: &commonPb.Status{ErrorCode: commonPb.ErrorCode_SUCCESS}, + ReqId: reqId, + ProxyId: 1, + QueryNodeId: 1, + Timestamp: 1, + ResultChannelId: 1, + } + searchResultMsg := SearchResultTask{ + HashValues: []int32{hashValue}, + SearchResult: searchResult, + } + tsMsg = searchResultMsg + case kTimeSync: + timeSyncResult := internalPb.TimeSyncMsg{ + PeerId: reqId, + Timestamp: 1, + } + timeSyncMsg := TimeSyncTask{ + HashValues: []int32{hashValue}, + TimeSyncMsg: timeSyncResult, + } + tsMsg = timeSyncMsg + } + return &tsMsg +} + +func initStream(pulsarAddress string, + producerChannels []string, + consumerChannels []string, + consumerSubName string, + msgPack *MsgPack, + inputMsgType MsgType, + outputMsgType MsgType) { + + // set input stream + inputStream := PulsarMsgStream{} + inputStream.SetPulsarCient(pulsarAddress) + inputStream.SetMsgMarshaler(GetMarshaler(inputMsgType), nil) + inputStream.SetProducers(producerChannels) + inputStream.SetRepackFunc(repackFunc) + + // set output stream + outputStream := PulsarMsgStream{} + outputStream.SetPulsarCient(pulsarAddress) + outputStream.SetMsgMarshaler(nil, GetMarshaler(outputMsgType)) + outputStream.SetConsumers(consumerChannels, consumerSubName, 100) + outputStream.InitMsgPackBuf(100) + outputStream.Start() + + //send msgPack + inputStream.Produce(msgPack) + //outputStream.Start() + + // receive msg + receiveCount := 0 + for { + result := outputStream.Consume() + if len(result.Msgs) > 0 { + msgs := result.Msgs + for _, v := range msgs { + receiveCount++ + fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) + } + } + if receiveCount >= len(msgPack.Msgs) { + break + } + } +} + +func TestStream_Insert(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"insert1", "insert2"} + consumerChannels := []string{"insert1", "insert2"} + consumerSubName := "subInsert" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kInsert, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kInsert, 1, 1)) + + //run stream + initStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kInsert, kInsert) +} + +func TestStream_Delete(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"delete"} + consumerChannels := []string{"delete"} + consumerSubName := "subDelete" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kDelete, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kDelete, 3, 3)) + + //run stream + initStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kDelete, kDelete) +} + +func TestStream_Search(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"search"} + consumerChannels := []string{"search"} + consumerSubName := "subSearch" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearch, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearch, 3, 3)) + + //run stream + initStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kSearch, kSearch) +} + +func TestStream_SearchResult(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"search"} + consumerChannels := []string{"search"} + consumerSubName := "subSearch" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearchResult, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearchResult, 3, 3)) + + //run stream + initStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kSearchResult, kSearchResult) +} + +func TestStream_TimeSync(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"search"} + consumerChannels := []string{"search"} + consumerSubName := "subSearch" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kTimeSync, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kTimeSync, 3, 3)) + + //run stream + initStream(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kTimeSync, kTimeSync) +} diff --git a/internal/msgstream/newstream.go b/internal/msgstream/newstream.go new file mode 100644 index 0000000000..5c35d96e65 --- /dev/null +++ b/internal/msgstream/newstream.go @@ -0,0 +1,71 @@ +package msgstream + +func NewInputStream(pulsarAddress string, + producerChannels []string, + timeTick bool) *MsgStream { + var stream MsgStream + if timeTick { + pulsarTtStream := PulsarTtMsgStream{} + pulsarTtStream.SetPulsarCient(pulsarAddress) + pulsarTtStream.SetProducers(producerChannels) + stream = &pulsarTtStream + } else { + pulsarStream := PulsarMsgStream{} + pulsarStream.SetPulsarCient(pulsarAddress) + pulsarStream.SetProducers(producerChannels) + stream = &pulsarStream + } + + return &stream +} + +func NewOutputStream(pulsarAddress string, + pulsarBufSize int64, + consumerChannelSize int64, + consumerChannels []string, + consumerSubName string, + timeTick bool) *MsgStream { + var stream MsgStream + if timeTick { + pulsarTtStream := PulsarTtMsgStream{} + pulsarTtStream.SetPulsarCient(pulsarAddress) + pulsarTtStream.SetConsumers(consumerChannels, consumerSubName, pulsarBufSize) + pulsarTtStream.InitMsgPackBuf(consumerChannelSize) + stream = &pulsarTtStream + } else { + pulsarStream := PulsarMsgStream{} + pulsarStream.SetPulsarCient(pulsarAddress) + pulsarStream.SetConsumers(consumerChannels, consumerSubName, pulsarBufSize) + pulsarStream.InitMsgPackBuf(consumerChannelSize) + stream = &pulsarStream + } + + return &stream +} + +func NewPipeStream(pulsarAddress string, + pulsarBufSize int64, + consumerChannelSize int64, + producerChannels []string, + consumerChannels []string, + consumerSubName string, + timeTick bool) *MsgStream { + var stream MsgStream + if timeTick { + pulsarTtStream := PulsarTtMsgStream{} + pulsarTtStream.SetPulsarCient(pulsarAddress) + pulsarTtStream.SetProducers(producerChannels) + pulsarTtStream.SetConsumers(consumerChannels, consumerSubName, pulsarBufSize) + pulsarTtStream.InitMsgPackBuf(consumerChannelSize) + stream = &pulsarTtStream + } else { + pulsarStream := PulsarMsgStream{} + pulsarStream.SetPulsarCient(pulsarAddress) + pulsarStream.SetProducers(producerChannels) + pulsarStream.SetConsumers(consumerChannels, consumerSubName, pulsarBufSize) + pulsarStream.InitMsgPackBuf(consumerChannelSize) + stream = &pulsarStream + } + + return &stream +} diff --git a/internal/msgstream/newstream_test.go b/internal/msgstream/newstream_test.go new file mode 100644 index 0000000000..0069cea889 --- /dev/null +++ b/internal/msgstream/newstream_test.go @@ -0,0 +1,251 @@ +package msgstream + +import ( + "fmt" + internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb" + "testing" +) + +func TestNewStream_Insert(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"insert1", "insert2"} + consumerChannels := []string{"insert1", "insert2"} + consumerSubName := "subInsert" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kInsert, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kInsert, 1, 1)) + inputStream := NewInputStream(pulsarAddress, producerChannels, false) + outputStream := NewOutputStream(pulsarAddress, 100, 100, consumerChannels, consumerSubName, false) + + (*inputStream).SetMsgMarshaler(GetMarshaler(kInsert), nil) + (*inputStream).SetRepackFunc(repackFunc) + (*outputStream).SetMsgMarshaler(nil, GetMarshaler(kInsert)) + (*outputStream).Start() + + //send msgPack + (*inputStream).Produce(&msgPack) + //(*outputStream).Start() + + // receive msg + receiveCount := 0 + for { + result := (*outputStream).Consume() + if len(result.Msgs) > 0 { + msgs := result.Msgs + for _, v := range msgs { + receiveCount++ + fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) + } + } + if receiveCount >= len(msgPack.Msgs) { + break + } + } +} + +func TestNewStream_Delete(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"delete1", "delete2"} + consumerChannels := []string{"delete1", "delete2"} + consumerSubName := "subDelete" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kDelete, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kDelete, 1, 1)) + inputStream := NewInputStream(pulsarAddress, producerChannels, false) + outputStream := NewOutputStream(pulsarAddress, 100, 100, consumerChannels, consumerSubName, false) + + (*inputStream).SetMsgMarshaler(GetMarshaler(kDelete), nil) + (*inputStream).SetRepackFunc(repackFunc) + (*outputStream).SetMsgMarshaler(nil, GetMarshaler(kDelete)) + (*outputStream).Start() + + //send msgPack + (*inputStream).Produce(&msgPack) + //(*outputStream).Start() + + // receive msg + receiveCount := 0 + for { + result := (*outputStream).Consume() + if len(result.Msgs) > 0 { + msgs := result.Msgs + for _, v := range msgs { + receiveCount++ + fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) + } + } + if receiveCount >= len(msgPack.Msgs) { + break + } + } +} + +func TestNewStream_Search(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"search1", "search2"} + consumerChannels := []string{"search1", "search2"} + consumerSubName := "subSearch" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearch, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearch, 1, 1)) + inputStream := NewInputStream(pulsarAddress, producerChannels, false) + outputStream := NewOutputStream(pulsarAddress, 100, 100, consumerChannels, consumerSubName, false) + + (*inputStream).SetMsgMarshaler(GetMarshaler(kSearch), nil) + (*inputStream).SetRepackFunc(repackFunc) + (*outputStream).SetMsgMarshaler(nil, GetMarshaler(kSearch)) + (*outputStream).Start() + + //send msgPack + (*inputStream).Produce(&msgPack) + //(*outputStream).Start() + + // receive msg + receiveCount := 0 + for { + result := (*outputStream).Consume() + if len(result.Msgs) > 0 { + msgs := result.Msgs + for _, v := range msgs { + receiveCount++ + fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) + } + } + if receiveCount >= len(msgPack.Msgs) { + break + } + } +} + +func TestNewStream_SearchResult(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"searchResult1", "searchResult2"} + consumerChannels := []string{"searchResult1", "searchResult2"} + consumerSubName := "subInsert" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearchResult, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kSearchResult, 1, 1)) + inputStream := NewInputStream(pulsarAddress, producerChannels, false) + outputStream := NewOutputStream(pulsarAddress, 100, 100, consumerChannels, consumerSubName, false) + + (*inputStream).SetMsgMarshaler(GetMarshaler(kSearchResult), nil) + (*inputStream).SetRepackFunc(repackFunc) + (*outputStream).SetMsgMarshaler(nil, GetMarshaler(kSearchResult)) + (*outputStream).Start() + + //send msgPack + (*inputStream).Produce(&msgPack) + //(*outputStream).Start() + + // receive msg + receiveCount := 0 + for { + result := (*outputStream).Consume() + if len(result.Msgs) > 0 { + msgs := result.Msgs + for _, v := range msgs { + receiveCount++ + fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) + } + } + if receiveCount >= len(msgPack.Msgs) { + break + } + } +} + +func TestNewStream_TimeSync(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"timeSync1", "timeSync2"} + consumerChannels := []string{"timeSync1", "timeSync2"} + consumerSubName := "subInsert" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kTimeSync, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kTimeSync, 1, 1)) + inputStream := NewInputStream(pulsarAddress, producerChannels, false) + outputStream := NewOutputStream(pulsarAddress, 100, 100, consumerChannels, consumerSubName, false) + + (*inputStream).SetMsgMarshaler(GetMarshaler(kTimeSync), nil) + (*inputStream).SetRepackFunc(repackFunc) + (*outputStream).SetMsgMarshaler(nil, GetMarshaler(kTimeSync)) + (*outputStream).Start() + + //send msgPack + (*inputStream).Produce(&msgPack) + + // receive msg + receiveCount := 0 + for { + result := (*outputStream).Consume() + if len(result.Msgs) > 0 { + msgs := result.Msgs + for _, v := range msgs { + receiveCount++ + fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) + } + } + if receiveCount >= len(msgPack.Msgs) { + break + } + } +} + +func TestNewStream_Insert_TimeTick(t *testing.T) { + pulsarAddress := "pulsar://localhost:6650" + producerChannels := []string{"insert"} + consumerChannels := []string{"insert"} + consumerSubName := "subInsert" + + msgPack := MsgPack{} + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kInsert, 0, 0)) + msgPack.Msgs = append(msgPack.Msgs, getTsMsg(kInsert, 1, 1)) + + insertRequest := internalPb.InsertRequest{ + ReqType: internalPb.ReqType_kTimeTick, + ReqId: 2, + CollectionName: "Collection", + PartitionTag: "Partition", + SegmentId: 1, + ChannelId: 1, + ProxyId: 1, + Timestamps: []uint64{1}, + } + insertMsg := InsertTask{ + HashValues: []int32{2}, + InsertRequest: insertRequest, + } + var tsMsg TsMsg = insertMsg + msgPack.Msgs = append(msgPack.Msgs, &tsMsg) + + inputStream := NewInputStream(pulsarAddress, producerChannels, false) + outputStream := NewOutputStream(pulsarAddress, 100, 100, consumerChannels, consumerSubName, true) + + (*inputStream).SetMsgMarshaler(GetMarshaler(kInsert), nil) + (*inputStream).SetRepackFunc(repackFunc) + (*outputStream).SetMsgMarshaler(nil, GetMarshaler(kInsert)) + (*outputStream).Start() + + //send msgPack + (*inputStream).Produce(&msgPack) + + // receive msg + receiveCount := 0 + for { + result := (*outputStream).Consume() + if len(result.Msgs) > 0 { + msgs := result.Msgs + for _, v := range msgs { + receiveCount++ + fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) + } + } + if receiveCount + 1 >= len(msgPack.Msgs) { + break + } + } +} \ No newline at end of file diff --git a/internal/msgstream/stream_test.go b/internal/msgstream/stream_test.go deleted file mode 100644 index 0a56b2dd26..0000000000 --- a/internal/msgstream/stream_test.go +++ /dev/null @@ -1,215 +0,0 @@ -package msgstream - -import ( - "fmt" - commonPb "github.com/zilliztech/milvus-distributed/internal/proto/commonpb" - internalPb "github.com/zilliztech/milvus-distributed/internal/proto/internalpb" - "github.com/zilliztech/milvus-distributed/internal/util/typeutil" - "log" - "testing" -) - -func produceHashTopic(input *MsgPack) map[uint32]*MsgPack { - msgs := input.Msgs - result := make(map[uint32]*MsgPack) - count := len(msgs) - for i := 0; i < count; i++ { - var key uint32 - var err error - switch (*msgs[i]).Type() { - case kInsert: - var insertMsg InsertTask = (*msgs[i]).(InsertTask) - key, err = typeutil.Hash32Int64(insertMsg.ReqId) - case kDelete: - var deleteMsg DeleteTask = (*msgs[i]).(DeleteTask) - key, err = typeutil.Hash32Int64(deleteMsg.ReqId) - case kSearch: - var searchMsg SearchTask = (*msgs[i]).(SearchTask) - key, err = typeutil.Hash32Int64(searchMsg.ReqId) - case kSearchResult: - var searchResultMsg SearchResultTask = (*msgs[i]).(SearchResultTask) - key, err = typeutil.Hash32Int64(searchResultMsg.ReqId) - case kTimeSync: - var timeSyncMsg TimeSyncTask = (*msgs[i]).(TimeSyncTask) - key, err = typeutil.Hash32Int64(timeSyncMsg.PeerId) - default: - log.Fatal("con't find msgType") - } - - if err != nil { - log.Fatal(err) - } - _, ok := result[key] - if ok == false { - msgPack := MsgPack{} - result[key] = &msgPack - } - result[key].Msgs = append(result[key].Msgs, msgs[i]) - } - return result -} - -func baseTest(pulsarAddress string, - producerChannels []string, - consumerChannels []string, - consumerSubName string, - msgPack *MsgPack, - inputMsgType MsgType, - outputMsgType MsgType) { - - // set input stream - inputStream := PulsarMsgStream{} - inputStream.SetPulsarCient(pulsarAddress) - inputStream.SetMsgMarshaler(GetMarshaler(inputMsgType), nil) - inputStream.SetProducers(producerChannels) - inputStream.SetHashFunc(produceHashTopic) - - // set output stream - outputStream := PulsarMsgStream{} - outputStream.SetPulsarCient(pulsarAddress) - outputStream.SetMsgMarshaler(nil, GetMarshaler(outputMsgType)) - outputStream.SetConsumers(consumerChannels, consumerSubName) - - //send msgPack - inputStream.Produce(msgPack) - - // receive msg - for { - result := outputStream.Consume() - if len(result.Msgs) > 0 { - msgs := result.Msgs - for _, v := range msgs { - fmt.Println("msg type: ", (*v).Type(), ", msg value: ", *v) - } - break - } - } -} - -func TestStream_Insert(t *testing.T) { - pulsarAddress := "pulsar://localhost:6650" - producerChannels := []string{"insert"} - consumerChannels := []string{"insert"} - consumerSubName := "subInsert" - - //pack tsmsg - insertRequest := internalPb.InsertRequest{ - ReqType: internalPb.ReqType_kInsert, - ReqId: 1, - CollectionName: "Collection", - PartitionTag: "Partition", - SegmentId: 1, - ChannelId: 1, - ProxyId: 1, - Timestamp: 1, - } - insertMsg := InsertTask{ - insertRequest, - } - var tsMsg TsMsg = insertMsg - msgPack := MsgPack{} - msgPack.Msgs = append(msgPack.Msgs, &tsMsg) - - //run stream - baseTest(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kInsert, kInsert) -} - -func TestStream_Delete(t *testing.T) { - pulsarAddress := "pulsar://localhost:6650" - producerChannels := []string{"delete"} - consumerChannels := []string{"delete"} - consumerSubName := "subDelete" - - //pack tsmsg - deleteRequest := internalPb.DeleteRequest{ - ReqType: internalPb.ReqType_kInsert, - ReqId: 1, - CollectionName: "Collection", - ChannelId: 1, - ProxyId: 1, - Timestamp: 1, - PrimaryKeys: []int64{1}, - } - deleteMsg := DeleteTask{ - deleteRequest, - } - var tsMsg TsMsg = deleteMsg - msgPack := MsgPack{} - msgPack.Msgs = append(msgPack.Msgs, &tsMsg) - - //run stream - baseTest(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kDelete, kDelete) -} - -func TestStream_Search(t *testing.T) { - pulsarAddress := "pulsar://localhost:6650" - producerChannels := []string{"search"} - consumerChannels := []string{"search"} - consumerSubName := "subSearch" - - //pack tsmsg - searchRequest := internalPb.SearchRequest{ - ReqType: internalPb.ReqType_kSearch, - ReqId: 1, - ProxyId: 1, - Timestamp: 1, - ResultChannelId: 1, - } - searchMsg := SearchTask{ - searchRequest, - } - var tsMsg TsMsg = searchMsg - msgPack := MsgPack{} - msgPack.Msgs = append(msgPack.Msgs, &tsMsg) - - //run stream - baseTest(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kSearch, kSearch) -} - -func TestStream_SearchResult(t *testing.T) { - pulsarAddress := "pulsar://localhost:6650" - producerChannels := []string{"search"} - consumerChannels := []string{"search"} - consumerSubName := "subSearch" - - //pack tsmsg - searchResult := internalPb.SearchResult{ - Status: &commonPb.Status{ErrorCode: commonPb.ErrorCode_SUCCESS}, - ReqId: 1, - ProxyId: 1, - QueryNodeId: 1, - Timestamp: 1, - ResultChannelId: 1, - } - searchResultMsg := SearchResultTask{ - searchResult, - } - var tsMsg TsMsg = searchResultMsg - msgPack := MsgPack{} - msgPack.Msgs = append(msgPack.Msgs, &tsMsg) - - //run stream - baseTest(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kSearchResult, kSearchResult) -} - -func TestStream_TimeSync(t *testing.T) { - pulsarAddress := "pulsar://localhost:6650" - producerChannels := []string{"search"} - consumerChannels := []string{"search"} - consumerSubName := "subSearch" - - //pack tsmsg - timeSyncResult := internalPb.TimeSyncMsg{ - PeerId: 1, - Timestamp: 1, - } - timeSyncMsg := TimeSyncTask{ - timeSyncResult, - } - var tsMsg TsMsg = timeSyncMsg - msgPack := MsgPack{} - msgPack.Msgs = append(msgPack.Msgs, &tsMsg) - - //run stream - baseTest(pulsarAddress, producerChannels, consumerChannels, consumerSubName, &msgPack, kTimeSync, kTimeSync) -} diff --git a/internal/msgstream/task.go b/internal/msgstream/task.go index c85595baa0..1253671fb2 100644 --- a/internal/msgstream/task.go +++ b/internal/msgstream/task.go @@ -7,125 +7,218 @@ import ( type MsgType uint32 const ( - kInsert MsgType = 1 - kDelete MsgType = 2 - kSearch MsgType = 3 - kSearchResult MsgType = 4 - kTimeTick MsgType = 5 - kSegmentStatics MsgType = 6 - kTimeSync MsgType = 7 + kInsert MsgType = 400 + kDelete MsgType = 401 + kSearch MsgType = 500 + kSearchResult MsgType = 1000 + + kSegmentStatics MsgType = 1100 + kTimeTick MsgType = 1200 + kTimeSync MsgType = 1201 ) type TsMsg interface { - SetTs(ts TimeStamp) - Ts() TimeStamp + SetTs(ts Timestamp) + BeginTs() Timestamp + EndTs() Timestamp Type() MsgType + HashKeys() []int32 } /////////////////////////////////////////Insert////////////////////////////////////////// type InsertTask struct { + HashValues []int32 internalPb.InsertRequest } -func (it InsertTask) SetTs(ts TimeStamp) { - it.Timestamp = uint64(ts) +func (it InsertTask) SetTs(ts Timestamp) { + // TODO:: } -func (it InsertTask) Ts() TimeStamp { - return TimeStamp(it.Timestamp) +func (it InsertTask) BeginTs() Timestamp { + timestamps := it.Timestamps + var beginTs Timestamp + for _, v := range timestamps { + beginTs = Timestamp(v) + break + } + for _, v := range timestamps { + if beginTs > Timestamp(v) { + beginTs = Timestamp(v) + } + } + return beginTs +} + +func (it InsertTask) EndTs() Timestamp { + timestamps := it.Timestamps + var endTs Timestamp + for _, v := range timestamps { + endTs = Timestamp(v) + break + } + for _, v := range timestamps { + if endTs < Timestamp(v) { + endTs = Timestamp(v) + } + } + return endTs } func (it InsertTask) Type() MsgType { - if it.ReqType == internalPb.ReqType_kNone { - return kTimeTick + if it.ReqType == internalPb.ReqType_kTimeTick { + return kTimeSync } return kInsert } +func (it InsertTask) HashKeys() []int32 { + return it.HashValues +} + /////////////////////////////////////////Delete////////////////////////////////////////// type DeleteTask struct { + HashValues []int32 internalPb.DeleteRequest } -func (dt DeleteTask) SetTs(ts TimeStamp) { - dt.Timestamp = uint64(ts) +func (dt DeleteTask) SetTs(ts Timestamp) { + // TODO:: } -func (dt DeleteTask) Ts() TimeStamp { - return TimeStamp(dt.Timestamp) +func (dt DeleteTask) BeginTs() Timestamp { + timestamps := dt.Timestamps + var beginTs Timestamp + for _, v := range timestamps { + beginTs = Timestamp(v) + break + } + for _, v := range timestamps { + if beginTs > Timestamp(v) { + beginTs = Timestamp(v) + } + } + return beginTs +} + +func (dt DeleteTask) EndTs() Timestamp { + timestamps := dt.Timestamps + var endTs Timestamp + for _, v := range timestamps { + endTs = Timestamp(v) + break + } + for _, v := range timestamps { + if endTs < Timestamp(v) { + endTs = Timestamp(v) + } + } + return endTs } func (dt DeleteTask) Type() MsgType { - if dt.ReqType == internalPb.ReqType_kNone { - return kTimeTick + if dt.ReqType == internalPb.ReqType_kTimeTick { + return kTimeSync } return kDelete } +func (dt DeleteTask) HashKeys() []int32 { + return dt.HashValues +} + /////////////////////////////////////////Search////////////////////////////////////////// type SearchTask struct { + HashValues []int32 internalPb.SearchRequest } -func (st SearchTask) SetTs(ts TimeStamp) { +func (st SearchTask) SetTs(ts Timestamp) { st.Timestamp = uint64(ts) } -func (st SearchTask) Ts() TimeStamp { - return TimeStamp(st.Timestamp) +func (st SearchTask) BeginTs() Timestamp { + return Timestamp(st.Timestamp) +} + +func (st SearchTask) EndTs() Timestamp { + return Timestamp(st.Timestamp) } func (st SearchTask) Type() MsgType { - if st.ReqType == internalPb.ReqType_kNone { - return kTimeTick + if st.ReqType == internalPb.ReqType_kTimeTick { + return kTimeSync } return kSearch } +func (st SearchTask) HashKeys() []int32 { + return st.HashValues +} + /////////////////////////////////////////SearchResult////////////////////////////////////////// type SearchResultTask struct { + HashValues []int32 internalPb.SearchResult } -func (srt SearchResultTask) SetTs(ts TimeStamp) { +func (srt SearchResultTask) SetTs(ts Timestamp) { srt.Timestamp = uint64(ts) } -func (srt SearchResultTask) Ts() TimeStamp { - return TimeStamp(srt.Timestamp) +func (srt SearchResultTask) BeginTs() Timestamp { + return Timestamp(srt.Timestamp) +} + +func (srt SearchResultTask) EndTs() Timestamp { + return Timestamp(srt.Timestamp) } func (srt SearchResultTask) Type() MsgType { return kSearchResult } +func (srt SearchResultTask) HashKeys() []int32 { + return srt.HashValues +} + /////////////////////////////////////////TimeSync////////////////////////////////////////// type TimeSyncTask struct { + HashValues []int32 internalPb.TimeSyncMsg } -func (tst TimeSyncTask) SetTs(ts TimeStamp) { +func (tst TimeSyncTask) SetTs(ts Timestamp) { tst.Timestamp = uint64(ts) } -func (tst TimeSyncTask) Ts() TimeStamp { - return TimeStamp(tst.Timestamp) +func (tst TimeSyncTask) BeginTs() Timestamp { + return Timestamp(tst.Timestamp) +} + +func (tst TimeSyncTask) EndTs() Timestamp { + return Timestamp(tst.Timestamp) } func (tst TimeSyncTask) Type() MsgType { return kTimeSync } +func (tst TimeSyncTask) HashKeys() []int32 { + return tst.HashValues +} + + ///////////////////////////////////////////Key2Seg////////////////////////////////////////// //type Key2SegTask struct { // internalPb.Key2SegMsg //} // ////TODO::Key2SegMsg don't have timestamp -//func (k2st Key2SegTask) SetTs(ts TimeStamp) {} +//func (k2st Key2SegTask) SetTs(ts Timestamp) {} // -//func (k2st Key2SegTask) Ts() TimeStamp { -// return TimeStamp(0) +//func (k2st Key2SegTask) Ts() Timestamp { +// return Timestamp(0) //} // //func (k2st Key2SegTask) Type() MsgType { diff --git a/internal/proto/internal_msg.proto b/internal/proto/internal_msg.proto index 26204b4e6a..8c161a4259 100644 --- a/internal/proto/internal_msg.proto +++ b/internal/proto/internal_msg.proto @@ -167,7 +167,7 @@ message DeleteRequest { string collection_name = 3; int64 channel_id = 4; int64 proxy_id = 5; - repeated uint64 timestamp = 6; + repeated uint64 timestamps = 6; repeated int64 primary_keys = 7; } diff --git a/internal/proto/internalpb/internal_msg.pb.go b/internal/proto/internalpb/internal_msg.pb.go index 817e817e6a..1a4a63aaff 100644 --- a/internal/proto/internalpb/internal_msg.pb.go +++ b/internal/proto/internalpb/internal_msg.pb.go @@ -1051,7 +1051,7 @@ type DeleteRequest struct { CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` ChannelId int64 `protobuf:"varint,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` ProxyId int64 `protobuf:"varint,5,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"` - Timestamp []uint64 `protobuf:"varint,6,rep,packed,name=timestamp,proto3" json:"timestamp,omitempty"` + Timestamps []uint64 `protobuf:"varint,6,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"` PrimaryKeys []int64 `protobuf:"varint,7,rep,packed,name=primary_keys,json=primaryKeys,proto3" json:"primary_keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1118,9 +1118,9 @@ func (m *DeleteRequest) GetProxyId() int64 { return 0 } -func (m *DeleteRequest) GetTimestamp() []uint64 { +func (m *DeleteRequest) GetTimestamps() []uint64 { if m != nil { - return m.Timestamp + return m.Timestamps } return nil } @@ -1546,77 +1546,77 @@ func init() { func init() { proto.RegisterFile("internal_msg.proto", fileDescriptor_7eb37f6b80b23116) } var fileDescriptor_7eb37f6b80b23116 = []byte{ - // 1150 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xde, 0xf1, 0xdb, 0xe5, 0xd8, 0x99, 0x74, 0x62, 0xe2, 0x5d, 0x60, 0xd7, 0xcc, 0x22, 0x11, - 0xad, 0x84, 0x23, 0xbc, 0x1c, 0xd8, 0xeb, 0xc6, 0x87, 0x98, 0x55, 0xa2, 0x68, 0x1c, 0x81, 0x84, - 0x84, 0x46, 0xe3, 0x99, 0xc2, 0x6e, 0xcd, 0x33, 0xdd, 0xed, 0x04, 0xe7, 0xce, 0x1d, 0xc4, 0x91, - 0x1b, 0x67, 0x0e, 0xfc, 0x0c, 0x5e, 0x77, 0xfe, 0x04, 0x08, 0x56, 0x02, 0xed, 0x15, 0x75, 0xcf, - 0xf8, 0x31, 0xce, 0x83, 0x87, 0x58, 0x29, 0x52, 0x6e, 0x53, 0xd5, 0xd5, 0xdd, 0xf5, 0x7d, 0x55, - 0x5d, 0xae, 0x32, 0x10, 0x1a, 0x0a, 0x64, 0xa1, 0xed, 0x5b, 0x01, 0x1f, 0x75, 0x62, 0x16, 0x89, - 0x88, 0x34, 0x03, 0xea, 0x9f, 0x4e, 0x78, 0x22, 0x75, 0x66, 0x06, 0xf7, 0xd6, 0x9c, 0x28, 0x08, - 0xa2, 0x30, 0x51, 0xdf, 0xdb, 0xe0, 0xc8, 0x4e, 0xa9, 0x83, 0x8b, 0x7d, 0x46, 0x0c, 0x70, 0xcc, - 0x23, 0x13, 0x4f, 0x26, 0xc8, 0x05, 0xd9, 0x86, 0x72, 0x8c, 0xc8, 0x2c, 0xea, 0xb6, 0xb4, 0xb6, - 0xb6, 0x93, 0x37, 0x4b, 0x52, 0xec, 0xbb, 0xe4, 0x31, 0x14, 0x58, 0xe4, 0x63, 0x2b, 0xd7, 0xd6, - 0x76, 0x1a, 0xdd, 0x07, 0x9d, 0x4b, 0x6f, 0xeb, 0x1c, 0x21, 0x32, 0x33, 0xf2, 0xd1, 0x54, 0xc6, - 0x64, 0x0b, 0x8a, 0x4e, 0x34, 0x09, 0x45, 0x2b, 0xdf, 0xd6, 0x76, 0xea, 0x66, 0x22, 0x18, 0xa7, - 0x50, 0x53, 0x37, 0xf2, 0x38, 0x0a, 0x39, 0x92,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ba, 0xcc, 0xc5, 0x78, 0x38, 0x2c, 0x29, 0xcd, 0xe3, - 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x88, 0x67, 0xba, 0x49, 0x12, 0x00, 0x00, + // 1147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x49, 0x6f, 0x23, 0x45, + 0x14, 0x9e, 0xf6, 0xee, 0xe7, 0xd8, 0xe9, 0x54, 0x62, 0xe2, 0x19, 0x60, 0xc6, 0xf4, 0x20, 0x11, + 0x8d, 0x84, 0x23, 0x3c, 0x1c, 0x98, 0xeb, 0xc4, 0x87, 0x98, 0x51, 0xa2, 0xa8, 0x1d, 0x81, 0x84, + 0x84, 0x5a, 0xed, 0xee, 0x87, 0x5d, 0xea, 0x35, 0x55, 0xe5, 0x04, 0xe7, 0x0f, 0x70, 0x05, 0x71, + 0xe4, 0xc6, 0x99, 0x03, 0x3f, 0x83, 0xed, 0xce, 0x9f, 0x00, 0xc1, 0x48, 0xa0, 0xb9, 0xa2, 0xaa, + 0x6e, 0x2f, 0xed, 0x2c, 0x2c, 0x62, 0xa4, 0x48, 0xb9, 0xf5, 0x7b, 0xb5, 0xbd, 0xef, 0x7b, 0x8b, + 0xdf, 0x33, 0x10, 0x1a, 0x0a, 0x64, 0xa1, 0xed, 0x5b, 0x01, 0x1f, 0x75, 0x62, 0x16, 0x89, 0x88, + 0x34, 0x03, 0xea, 0x9f, 0x4e, 0x78, 0x22, 0x75, 0x66, 0x1b, 0xee, 0xad, 0x39, 0x51, 0x10, 0x44, + 0x61, 0xa2, 0xbe, 0xb7, 0xc1, 0x91, 0x9d, 0x52, 0x07, 0x17, 0xe7, 0x8c, 0x18, 0xe0, 0x98, 0x47, + 0x26, 0x9e, 0x4c, 0x90, 0x0b, 0xb2, 0x0d, 0xe5, 0x18, 0x91, 0x59, 0xd4, 0x6d, 0x69, 0x6d, 0x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9b, 0x68, 0xbb, 0xc8, + 0x74, 0x4d, 0x7e, 0x7f, 0xc8, 0xa8, 0xd4, 0xe7, 0x24, 0xa5, 0x47, 0x32, 0x75, 0xf5, 0xfc, 0xd3, + 0xde, 0x47, 0x4f, 0x47, 0x54, 0x8c, 0x27, 0x43, 0x59, 0x0c, 0x76, 0xcf, 0xa9, 0xef, 0xd3, 0x73, + 0x81, 0xce, 0x78, 0x37, 0x89, 0x8c, 0xb7, 0x5d, 0xca, 0x05, 0xa3, 0xc3, 0x89, 0x40, 0x77, 0x77, + 0x16, 0x1f, 0xbb, 0x2a, 0x5c, 0xe6, 0x62, 0x3c, 0x1c, 0x96, 0x94, 0xe6, 0xf1, 0x5f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x7a, 0xb3, 0x5a, 0xe2, 0x4b, 0x12, 0x00, 0x00, } diff --git a/internal/proto/service_msg.proto b/internal/proto/service_msg.proto index 5039e4ed1a..6f1572f038 100644 --- a/internal/proto/service_msg.proto +++ b/internal/proto/service_msg.proto @@ -33,13 +33,29 @@ message RowBatch { repeated int32 hash_keys = 4; } +/** +* @brief Placeholder value types +*/ +enum PlaceholderType { + NONE = 0; + VECTOR_BINARY = 100; + VECTOR_FLOAT = 101; +} + + +message VectorValues { + repeated common.Blob value = 1; +} + /** - * @brief Placeholder value in DSL - */ +* @brief Placeholder value in DSL +*/ message PlaceholderValue { string tag = 1; - common.Blob value = 2; + PlaceholderType type = 2; + // value contains the serialized VectorValues + common.Blob value = 3; } diff --git a/internal/proto/servicepb/service_msg.pb.go b/internal/proto/servicepb/service_msg.pb.go index e6e18a7a3d..56689facc7 100644 --- a/internal/proto/servicepb/service_msg.pb.go +++ b/internal/proto/servicepb/service_msg.pb.go @@ -22,6 +22,36 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +//* +// @brief Placeholder value types +type PlaceholderType int32 + +const ( + PlaceholderType_NONE PlaceholderType = 0 + PlaceholderType_VECTOR_BINARY PlaceholderType = 100 + PlaceholderType_VECTOR_FLOAT PlaceholderType = 101 +) + +var PlaceholderType_name = map[int32]string{ + 0: "NONE", + 100: "VECTOR_BINARY", + 101: "VECTOR_FLOAT", +} + +var PlaceholderType_value = map[string]int32{ + "NONE": 0, + "VECTOR_BINARY": 100, + "VECTOR_FLOAT": 101, +} + +func (x PlaceholderType) String() string { + return proto.EnumName(PlaceholderType_name, int32(x)) +} + +func (PlaceholderType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b4b40b84dd2f74cb, []int{0} +} + //* // @brief Collection name type CollectionName struct { @@ -177,11 +207,52 @@ func (m *RowBatch) GetHashKeys() []int32 { return nil } +type VectorValues struct { + Value []*commonpb.Blob `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VectorValues) Reset() { *m = VectorValues{} } +func (m *VectorValues) String() string { return proto.CompactTextString(m) } +func (*VectorValues) ProtoMessage() {} +func (*VectorValues) Descriptor() ([]byte, []int) { + return fileDescriptor_b4b40b84dd2f74cb, []int{3} +} + +func (m *VectorValues) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VectorValues.Unmarshal(m, b) +} +func (m *VectorValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VectorValues.Marshal(b, m, deterministic) +} +func (m *VectorValues) XXX_Merge(src proto.Message) { + xxx_messageInfo_VectorValues.Merge(m, src) +} +func (m *VectorValues) XXX_Size() int { + return xxx_messageInfo_VectorValues.Size(m) +} +func (m *VectorValues) XXX_DiscardUnknown() { + xxx_messageInfo_VectorValues.DiscardUnknown(m) +} + +var xxx_messageInfo_VectorValues proto.InternalMessageInfo + +func (m *VectorValues) GetValue() []*commonpb.Blob { + if m != nil { + return m.Value + } + return nil +} + //* // @brief Placeholder value in DSL type PlaceholderValue struct { - Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` - Value *commonpb.Blob `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + Type PlaceholderType `protobuf:"varint,2,opt,name=type,proto3,enum=milvus.proto.service.PlaceholderType" json:"type,omitempty"` + // value contains the serialized VectorValues + Value *commonpb.Blob `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -191,7 +262,7 @@ func (m *PlaceholderValue) Reset() { *m = PlaceholderValue{} } func (m *PlaceholderValue) String() string { return proto.CompactTextString(m) } func (*PlaceholderValue) ProtoMessage() {} func (*PlaceholderValue) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{3} + return fileDescriptor_b4b40b84dd2f74cb, []int{4} } func (m *PlaceholderValue) XXX_Unmarshal(b []byte) error { @@ -219,6 +290,13 @@ func (m *PlaceholderValue) GetTag() string { return "" } +func (m *PlaceholderValue) GetType() PlaceholderType { + if m != nil { + return m.Type + } + return PlaceholderType_NONE +} + func (m *PlaceholderValue) GetValue() *commonpb.Blob { if m != nil { return m.Value @@ -242,7 +320,7 @@ func (m *Query) Reset() { *m = Query{} } func (m *Query) String() string { return proto.CompactTextString(m) } func (*Query) ProtoMessage() {} func (*Query) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{4} + return fileDescriptor_b4b40b84dd2f74cb, []int{5} } func (m *Query) XXX_Unmarshal(b []byte) error { @@ -305,7 +383,7 @@ func (m *StringResponse) Reset() { *m = StringResponse{} } func (m *StringResponse) String() string { return proto.CompactTextString(m) } func (*StringResponse) ProtoMessage() {} func (*StringResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{5} + return fileDescriptor_b4b40b84dd2f74cb, []int{6} } func (m *StringResponse) XXX_Unmarshal(b []byte) error { @@ -354,7 +432,7 @@ func (m *BoolResponse) Reset() { *m = BoolResponse{} } func (m *BoolResponse) String() string { return proto.CompactTextString(m) } func (*BoolResponse) ProtoMessage() {} func (*BoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{6} + return fileDescriptor_b4b40b84dd2f74cb, []int{7} } func (m *BoolResponse) XXX_Unmarshal(b []byte) error { @@ -403,7 +481,7 @@ func (m *StringListResponse) Reset() { *m = StringListResponse{} } func (m *StringListResponse) String() string { return proto.CompactTextString(m) } func (*StringListResponse) ProtoMessage() {} func (*StringListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{7} + return fileDescriptor_b4b40b84dd2f74cb, []int{8} } func (m *StringListResponse) XXX_Unmarshal(b []byte) error { @@ -452,7 +530,7 @@ func (m *IntegerListResponse) Reset() { *m = IntegerListResponse{} } func (m *IntegerListResponse) String() string { return proto.CompactTextString(m) } func (*IntegerListResponse) ProtoMessage() {} func (*IntegerListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{8} + return fileDescriptor_b4b40b84dd2f74cb, []int{9} } func (m *IntegerListResponse) XXX_Unmarshal(b []byte) error { @@ -502,7 +580,7 @@ func (m *IntegerRangeResponse) Reset() { *m = IntegerRangeResponse{} } func (m *IntegerRangeResponse) String() string { return proto.CompactTextString(m) } func (*IntegerRangeResponse) ProtoMessage() {} func (*IntegerRangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{9} + return fileDescriptor_b4b40b84dd2f74cb, []int{10} } func (m *IntegerRangeResponse) XXX_Unmarshal(b []byte) error { @@ -559,7 +637,7 @@ func (m *CollectionDescription) Reset() { *m = CollectionDescription{} } func (m *CollectionDescription) String() string { return proto.CompactTextString(m) } func (*CollectionDescription) ProtoMessage() {} func (*CollectionDescription) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{10} + return fileDescriptor_b4b40b84dd2f74cb, []int{11} } func (m *CollectionDescription) XXX_Unmarshal(b []byte) error { @@ -616,7 +694,7 @@ func (m *PartitionDescription) Reset() { *m = PartitionDescription{} } func (m *PartitionDescription) String() string { return proto.CompactTextString(m) } func (*PartitionDescription) ProtoMessage() {} func (*PartitionDescription) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{11} + return fileDescriptor_b4b40b84dd2f74cb, []int{12} } func (m *PartitionDescription) XXX_Unmarshal(b []byte) error { @@ -674,7 +752,7 @@ func (m *Score) Reset() { *m = Score{} } func (m *Score) String() string { return proto.CompactTextString(m) } func (*Score) ProtoMessage() {} func (*Score) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{12} + return fileDescriptor_b4b40b84dd2f74cb, []int{13} } func (m *Score) XXX_Unmarshal(b []byte) error { @@ -724,7 +802,7 @@ func (m *Hits) Reset() { *m = Hits{} } func (m *Hits) String() string { return proto.CompactTextString(m) } func (*Hits) ProtoMessage() {} func (*Hits) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{13} + return fileDescriptor_b4b40b84dd2f74cb, []int{14} } func (m *Hits) XXX_Unmarshal(b []byte) error { @@ -780,7 +858,7 @@ func (m *QueryResult) Reset() { *m = QueryResult{} } func (m *QueryResult) String() string { return proto.CompactTextString(m) } func (*QueryResult) ProtoMessage() {} func (*QueryResult) Descriptor() ([]byte, []int) { - return fileDescriptor_b4b40b84dd2f74cb, []int{14} + return fileDescriptor_b4b40b84dd2f74cb, []int{15} } func (m *QueryResult) XXX_Unmarshal(b []byte) error { @@ -816,9 +894,11 @@ func (m *QueryResult) GetHits() []*Hits { } func init() { + proto.RegisterEnum("milvus.proto.service.PlaceholderType", PlaceholderType_name, PlaceholderType_value) proto.RegisterType((*CollectionName)(nil), "milvus.proto.service.CollectionName") proto.RegisterType((*PartitionName)(nil), "milvus.proto.service.PartitionName") proto.RegisterType((*RowBatch)(nil), "milvus.proto.service.RowBatch") + proto.RegisterType((*VectorValues)(nil), "milvus.proto.service.VectorValues") proto.RegisterType((*PlaceholderValue)(nil), "milvus.proto.service.PlaceholderValue") proto.RegisterType((*Query)(nil), "milvus.proto.service.Query") proto.RegisterType((*StringResponse)(nil), "milvus.proto.service.StringResponse") @@ -836,47 +916,53 @@ func init() { func init() { proto.RegisterFile("service_msg.proto", fileDescriptor_b4b40b84dd2f74cb) } var fileDescriptor_b4b40b84dd2f74cb = []byte{ - // 665 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6f, 0xd3, 0x3e, - 0x18, 0x56, 0x9a, 0xb6, 0xbf, 0xf6, 0x6d, 0xd7, 0xdf, 0x08, 0x05, 0x95, 0xed, 0x52, 0x32, 0x0d, - 0x7a, 0xa1, 0x15, 0x1b, 0x12, 0xe2, 0xc0, 0x61, 0xdd, 0x0e, 0xb0, 0x21, 0x34, 0x5c, 0x40, 0x02, - 0x0e, 0x95, 0x93, 0x58, 0x89, 0x85, 0x13, 0x57, 0xb6, 0xb3, 0xa9, 0xbb, 0xf2, 0x71, 0x38, 0xf3, - 0x19, 0xb8, 0xf1, 0x99, 0x90, 0x9d, 0x34, 0x6d, 0xa7, 0x80, 0xc6, 0xb6, 0x9b, 0xfd, 0xfa, 0xfd, - 0xf3, 0x3c, 0x8f, 0x5e, 0x3f, 0x70, 0x47, 0x12, 0x71, 0x46, 0x7d, 0x32, 0x8d, 0x65, 0x38, 0x9c, - 0x09, 0xae, 0xb8, 0xd3, 0x8d, 0x29, 0x3b, 0x4b, 0x65, 0x76, 0x1b, 0xe6, 0xef, 0x5b, 0x6d, 0x9f, - 0xc7, 0x31, 0x4f, 0xb2, 0xe8, 0x56, 0x5b, 0xfa, 0x11, 0x89, 0x71, 0x76, 0x73, 0x5f, 0x40, 0xe7, - 0x90, 0x33, 0x46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x9d, 0x7b, - 0x42, 0xe6, 0x66, 0x85, 0x4f, 0x31, 0x15, 0x68, 0xa5, 0xc8, 0xfd, 0x69, 0x41, 0xb7, 0xb0, 0xb3, - 0x1b, 0xf3, 0x79, 0x0e, 0x55, 0xf3, 0x6b, 0x33, 0x36, 0x3b, 0x7f, 0xf8, 0x56, 0xab, 0xee, 0x89, - 0x4c, 0xc1, 0x6d, 0x30, 0x79, 0x0a, 0xb5, 0x89, 0xcf, 0x45, 0x99, 0x25, 0xad, 0xaf, 0x50, 0xa5, - 0x58, 0xa1, 0x6f, 0x16, 0x54, 0x5f, 0x51, 0x65, 0x8c, 0x82, 0x06, 0x9a, 0xa9, 0x5e, 0x30, 0x7d, - 0x5c, 0xb3, 0xcf, 0xca, 0x95, 0xed, 0x53, 0x8b, 0xa6, 0x31, 0x2c, 0x28, 0x6c, 0x97, 0x2b, 0x60, - 0x70, 0xa2, 0x3c, 0xd5, 0x15, 0xd0, 0x32, 0xf6, 0x87, 0x88, 0x4c, 0x99, 0xba, 0x9e, 0xf0, 0x43, - 0xa8, 0x46, 0x54, 0xc9, 0x1c, 0xea, 0x56, 0xf9, 0x58, 0x4d, 0x15, 0x99, 0xbc, 0xf1, 0xe1, 0xe7, - 0x83, 0x90, 0xaa, 0x28, 0xf5, 0x74, 0xbf, 0xd1, 0x05, 0x65, 0x8c, 0x5e, 0x28, 0xe2, 0x47, 0xa3, - 0xac, 0xf0, 0x49, 0x40, 0xa5, 0x12, 0xd4, 0x4b, 0x15, 0x09, 0x46, 0x34, 0x51, 0x44, 0x24, 0x98, - 0x8d, 0x4c, 0xb7, 0x51, 0xde, 0x6d, 0xe6, 0x79, 0x75, 0x13, 0xd8, 0xff, 0x1d, 0x00, 0x00, 0xff, - 0xff, 0x49, 0xd7, 0x76, 0xe4, 0x92, 0x07, 0x00, 0x00, + // 753 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac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 0xff, 0xff, 0xce, 0x69, 0xc1, 0x30, 0x51, 0x08, 0x00, + 0x00, }