diff --git a/go.mod b/go.mod index f5eb1a0671..2df26d50c8 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/klauspost/compress v1.16.5 github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d - github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2 + github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231114080011-9a495865219e github.com/milvus-io/milvus/pkg v0.0.1 github.com/minio/minio-go/v7 v7.0.56 github.com/prometheus/client_golang v1.14.0 diff --git a/go.sum b/go.sum index cd45e06451..045edc35d4 100644 --- a/go.sum +++ b/go.sum @@ -577,8 +577,8 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8= github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4= -github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2 h1:tBcKiEUcX6i3MaFYvMJO1F7R6fIoeLFkg1kSGE1Tvpk= -github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek= +github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231114080011-9a495865219e h1:IH1WAXwEF8vbwahPdupi4zzRNWViT4B7fZzIjtRLpG4= +github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231114080011-9a495865219e/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek= github.com/milvus-io/pulsar-client-go v0.6.10 h1:eqpJjU+/QX0iIhEo3nhOqMNXL+TyInAs1IAHZCrCM/A= github.com/milvus-io/pulsar-client-go v0.6.10/go.mod h1:lQqCkgwDF8YFYjKA+zOheTk1tev2B+bKj5j7+nm8M1w= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= diff --git a/internal/core/src/pb/common.pb.cc b/internal/core/src/pb/common.pb.cc index e994af71fb..d71ef09b61 100644 --- a/internal/core/src/pb/common.pb.cc +++ b/internal/core/src/pb/common.pb.cc @@ -121,22 +121,9 @@ struct AddressDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AddressDefaultTypeInternal _Address_default_instance_; -PROTOBUF_CONSTEXPR MsgBase_PropertiesEntry_DoNotUse::MsgBase_PropertiesEntry_DoNotUse( - ::_pbi::ConstantInitialized) {} -struct MsgBase_PropertiesEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR MsgBase_PropertiesEntry_DoNotUseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~MsgBase_PropertiesEntry_DoNotUseDefaultTypeInternal() {} - union { - MsgBase_PropertiesEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MsgBase_PropertiesEntry_DoNotUseDefaultTypeInternal _MsgBase_PropertiesEntry_DoNotUse_default_instance_; PROTOBUF_CONSTEXPR MsgBase::MsgBase( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.properties_)*/{::_pbi::ConstantInitialized()} - , /*decltype(_impl_.replicateinfo_)*/nullptr - , /*decltype(_impl_.msgid_)*/int64_t{0} + /*decltype(_impl_.msgid_)*/int64_t{0} , /*decltype(_impl_.timestamp_)*/uint64_t{0u} , /*decltype(_impl_.sourceid_)*/int64_t{0} , /*decltype(_impl_.targetid_)*/int64_t{0} @@ -151,20 +138,6 @@ struct MsgBaseDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MsgBaseDefaultTypeInternal _MsgBase_default_instance_; -PROTOBUF_CONSTEXPR ReplicateInfo::ReplicateInfo( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.msgtimestamp_)*/uint64_t{0u} - , /*decltype(_impl_.isreplicate_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct ReplicateInfoDefaultTypeInternal { - PROTOBUF_CONSTEXPR ReplicateInfoDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ReplicateInfoDefaultTypeInternal() {} - union { - ReplicateInfo _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReplicateInfoDefaultTypeInternal _ReplicateInfo_default_instance_; PROTOBUF_CONSTEXPR MsgHeader::MsgHeader( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.base_)*/nullptr @@ -283,7 +256,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace common } // namespace proto } // namespace milvus -static ::_pb::Metadata file_level_metadata_common_2eproto[18]; +static ::_pb::Metadata file_level_metadata_common_2eproto[16]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_common_2eproto[13]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_common_2eproto = nullptr; @@ -344,16 +317,6 @@ const uint32_t TableStruct_common_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(p ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::milvus::proto::common::Address, _impl_.ip_), PROTOBUF_FIELD_OFFSET(::milvus::proto::common::Address, _impl_.port_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse, value_), - 0, - 1, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, _internal_metadata_), ~0u, // no _extensions_ @@ -365,16 +328,6 @@ const uint32_t TableStruct_common_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(p PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, _impl_.timestamp_), PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, _impl_.sourceid_), PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, _impl_.targetid_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, _impl_.properties_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgBase, _impl_.replicateinfo_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ReplicateInfo, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ReplicateInfo, _impl_.isreplicate_), - PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ReplicateInfo, _impl_.msgtimestamp_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::common::MsgHeader, _internal_metadata_), ~0u, // no _extensions_ @@ -461,17 +414,15 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 32, -1, -1, sizeof(::milvus::proto::common::PlaceholderValue)}, { 41, -1, -1, sizeof(::milvus::proto::common::PlaceholderGroup)}, { 48, -1, -1, sizeof(::milvus::proto::common::Address)}, - { 56, 64, -1, sizeof(::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse)}, - { 66, -1, -1, sizeof(::milvus::proto::common::MsgBase)}, - { 79, -1, -1, sizeof(::milvus::proto::common::ReplicateInfo)}, - { 87, -1, -1, sizeof(::milvus::proto::common::MsgHeader)}, - { 94, -1, -1, sizeof(::milvus::proto::common::DMLMsgHeader)}, - { 102, -1, -1, sizeof(::milvus::proto::common::PrivilegeExt)}, - { 112, -1, -1, sizeof(::milvus::proto::common::SegmentStats)}, - { 120, 128, -1, sizeof(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse)}, - { 130, -1, -1, sizeof(::milvus::proto::common::ClientInfo)}, - { 142, 150, -1, sizeof(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse)}, - { 152, -1, -1, sizeof(::milvus::proto::common::ServerInfo)}, + { 56, -1, -1, sizeof(::milvus::proto::common::MsgBase)}, + { 67, -1, -1, sizeof(::milvus::proto::common::MsgHeader)}, + { 74, -1, -1, sizeof(::milvus::proto::common::DMLMsgHeader)}, + { 82, -1, -1, sizeof(::milvus::proto::common::PrivilegeExt)}, + { 92, -1, -1, sizeof(::milvus::proto::common::SegmentStats)}, + { 100, 108, -1, sizeof(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse)}, + { 110, -1, -1, sizeof(::milvus::proto::common::ClientInfo)}, + { 122, 130, -1, sizeof(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse)}, + { 132, -1, -1, sizeof(::milvus::proto::common::ServerInfo)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -482,9 +433,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::milvus::proto::common::_PlaceholderValue_default_instance_._instance, &::milvus::proto::common::_PlaceholderGroup_default_instance_._instance, &::milvus::proto::common::_Address_default_instance_._instance, - &::milvus::proto::common::_MsgBase_PropertiesEntry_DoNotUse_default_instance_._instance, &::milvus::proto::common::_MsgBase_default_instance_._instance, - &::milvus::proto::common::_ReplicateInfo_default_instance_._instance, &::milvus::proto::common::_MsgHeader_default_instance_._instance, &::milvus::proto::common::_DMLMsgHeader_default_instance_._instance, &::milvus::proto::common::_PrivilegeExt_default_instance_._instance, @@ -508,187 +457,181 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE( "alues\030\003 \003(\014\"O\n\020PlaceholderGroup\022;\n\014place" "holders\030\001 \003(\0132%.milvus.proto.common.Plac" "eholderValue\"#\n\007Address\022\n\n\002ip\030\001 \001(\t\022\014\n\004p" - "ort\030\002 \001(\003\"\257\002\n\007MsgBase\022.\n\010msg_type\030\001 \001(\0162" - "\034.milvus.proto.common.MsgType\022\r\n\005msgID\030\002" - " \001(\003\022\021\n\ttimestamp\030\003 \001(\004\022\020\n\010sourceID\030\004 \001(" - "\003\022\020\n\010targetID\030\005 \001(\003\022@\n\nproperties\030\006 \003(\0132" - ",.milvus.proto.common.MsgBase.Properties" - "Entry\0229\n\rreplicateInfo\030\007 \001(\0132\".milvus.pr" - "oto.common.ReplicateInfo\0321\n\017PropertiesEn" - "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\":\n\rR" - "eplicateInfo\022\023\n\013isReplicate\030\001 \001(\010\022\024\n\014msg" - "Timestamp\030\002 \001(\004\"7\n\tMsgHeader\022*\n\004base\030\001 \001" - "(\0132\034.milvus.proto.common.MsgBase\"M\n\014DMLM" - "sgHeader\022*\n\004base\030\001 \001(\0132\034.milvus.proto.co" - "mmon.MsgBase\022\021\n\tshardName\030\002 \001(\t\"\273\001\n\014Priv" - "ilegeExt\0224\n\013object_type\030\001 \001(\0162\037.milvus.p" - "roto.common.ObjectType\022>\n\020object_privile" - "ge\030\002 \001(\0162$.milvus.proto.common.ObjectPri" - "vilege\022\031\n\021object_name_index\030\003 \001(\005\022\032\n\022obj" - "ect_name_indexs\030\004 \001(\005\"2\n\014SegmentStats\022\021\n" - "\tSegmentID\030\001 \001(\003\022\017\n\007NumRows\030\002 \001(\003\"\325\001\n\nCl" - "ientInfo\022\020\n\010sdk_type\030\001 \001(\t\022\023\n\013sdk_versio" - "n\030\002 \001(\t\022\022\n\nlocal_time\030\003 \001(\t\022\014\n\004user\030\004 \001(" - "\t\022\014\n\004host\030\005 \001(\t\022\?\n\010reserved\030\006 \003(\0132-.milv" - "us.proto.common.ClientInfo.ReservedEntry" - "\032/\n\rReservedEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - "\002 \001(\t:\0028\001\"\343\001\n\nServerInfo\022\022\n\nbuild_tags\030\001" - " \001(\t\022\022\n\nbuild_time\030\002 \001(\t\022\022\n\ngit_commit\030\003" - " \001(\t\022\022\n\ngo_version\030\004 \001(\t\022\023\n\013deploy_mode\030" - "\005 \001(\t\022\?\n\010reserved\030\006 \003(\0132-.milvus.proto.c" - "ommon.ServerInfo.ReservedEntry\032/\n\rReserv" - "edEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*" - "\303\n\n\tErrorCode\022\013\n\007Success\020\000\022\023\n\017Unexpected" - "Error\020\001\022\021\n\rConnectFailed\020\002\022\024\n\020Permission" - "Denied\020\003\022\027\n\023CollectionNotExists\020\004\022\023\n\017Ill" - "egalArgument\020\005\022\024\n\020IllegalDimension\020\007\022\024\n\020" - "IllegalIndexType\020\010\022\031\n\025IllegalCollectionN" - "ame\020\t\022\017\n\013IllegalTOPK\020\n\022\024\n\020IllegalRowReco" - "rd\020\013\022\023\n\017IllegalVectorID\020\014\022\027\n\023IllegalSear" - "chResult\020\r\022\020\n\014FileNotFound\020\016\022\016\n\nMetaFail" - "ed\020\017\022\017\n\013CacheFailed\020\020\022\026\n\022CannotCreateFol" - "der\020\021\022\024\n\020CannotCreateFile\020\022\022\026\n\022CannotDel" - "eteFolder\020\023\022\024\n\020CannotDeleteFile\020\024\022\023\n\017Bui" - "ldIndexError\020\025\022\020\n\014IllegalNLIST\020\026\022\025\n\021Ille" - "galMetricType\020\027\022\017\n\013OutOfMemory\020\030\022\021\n\rInde" - "xNotExist\020\031\022\023\n\017EmptyCollection\020\032\022\033\n\027Upda" - "teImportTaskFailure\020\033\022\032\n\026CollectionNameN" - "otFound\020\034\022\033\n\027CreateCredentialFailure\020\035\022\033" - "\n\027UpdateCredentialFailure\020\036\022\033\n\027DeleteCre" - "dentialFailure\020\037\022\030\n\024GetCredentialFailure" - "\020 \022\030\n\024ListCredUsersFailure\020!\022\022\n\016GetUserF" - "ailure\020\"\022\025\n\021CreateRoleFailure\020#\022\023\n\017DropR" - "oleFailure\020$\022\032\n\026OperateUserRoleFailure\020%" - "\022\025\n\021SelectRoleFailure\020&\022\025\n\021SelectUserFai" - "lure\020\'\022\031\n\025SelectResourceFailure\020(\022\033\n\027Ope" - "ratePrivilegeFailure\020)\022\026\n\022SelectGrantFai" - "lure\020*\022!\n\035RefreshPolicyInfoCacheFailure\020" - "+\022\025\n\021ListPolicyFailure\020,\022\022\n\016NotShardLead" - "er\020-\022\026\n\022NoReplicaAvailable\020.\022\023\n\017SegmentN" - "otFound\020/\022\r\n\tForceDeny\0200\022\r\n\tRateLimit\0201\022" - "\022\n\016NodeIDNotMatch\0202\022\024\n\020UpsertAutoIDTrue\020" - "3\022\034\n\030InsufficientMemoryToLoad\0204\022\030\n\024Memor" - "yQuotaExhausted\0205\022\026\n\022DiskQuotaExhausted\020" - "6\022\025\n\021TimeTickLongDelay\0207\022\021\n\rNotReadyServ" - "e\0208\022\033\n\027NotReadyCoordActivating\0209\022\017\n\013Data" - "CoordNA\020d\022\022\n\rDDRequestRace\020\350\007*c\n\nIndexSt" - "ate\022\022\n\016IndexStateNone\020\000\022\014\n\010Unissued\020\001\022\016\n" - "\nInProgress\020\002\022\014\n\010Finished\020\003\022\n\n\006Failed\020\004\022" - "\t\n\005Retry\020\005*\202\001\n\014SegmentState\022\024\n\020SegmentSt" - "ateNone\020\000\022\014\n\010NotExist\020\001\022\013\n\007Growing\020\002\022\n\n\006" - "Sealed\020\003\022\013\n\007Flushed\020\004\022\014\n\010Flushing\020\005\022\013\n\007D" - "ropped\020\006\022\r\n\tImporting\020\007*i\n\017PlaceholderTy" - "pe\022\010\n\004None\020\000\022\020\n\014BinaryVector\020d\022\017\n\013FloatV" - "ector\020e\022\021\n\rFloat16Vector\020f\022\t\n\005Int64\020\005\022\013\n" - "\007VarChar\020\025*\264\020\n\007MsgType\022\r\n\tUndefined\020\000\022\024\n" - "\020CreateCollection\020d\022\022\n\016DropCollection\020e\022" - "\021\n\rHasCollection\020f\022\026\n\022DescribeCollection" - "\020g\022\023\n\017ShowCollections\020h\022\024\n\020GetSystemConf" - "igs\020i\022\022\n\016LoadCollection\020j\022\025\n\021ReleaseColl" - "ection\020k\022\017\n\013CreateAlias\020l\022\r\n\tDropAlias\020m" - "\022\016\n\nAlterAlias\020n\022\023\n\017AlterCollection\020o\022\024\n" - "\020RenameCollection\020p\022\021\n\rDescribeAlias\020q\022\017" - "\n\013ListAliases\020r\022\024\n\017CreatePartition\020\310\001\022\022\n" - "\rDropPartition\020\311\001\022\021\n\014HasPartition\020\312\001\022\026\n\021" - "DescribePartition\020\313\001\022\023\n\016ShowPartitions\020\314" - "\001\022\023\n\016LoadPartitions\020\315\001\022\026\n\021ReleasePartiti" - "ons\020\316\001\022\021\n\014ShowSegments\020\372\001\022\024\n\017DescribeSeg" - "ment\020\373\001\022\021\n\014LoadSegments\020\374\001\022\024\n\017ReleaseSeg" - "ments\020\375\001\022\024\n\017HandoffSegments\020\376\001\022\030\n\023LoadBa" - "lanceSegments\020\377\001\022\025\n\020DescribeSegments\020\200\002\022" - "\034\n\027FederListIndexedSegment\020\201\002\022\"\n\035FederDe" - "scribeSegmentIndexData\020\202\002\022\020\n\013CreateIndex" - "\020\254\002\022\022\n\rDescribeIndex\020\255\002\022\016\n\tDropIndex\020\256\002\022" - "\027\n\022GetIndexStatistics\020\257\002\022\013\n\006Insert\020\220\003\022\013\n" - "\006Delete\020\221\003\022\n\n\005Flush\020\222\003\022\027\n\022ResendSegmentS" - "tats\020\223\003\022\013\n\006Upsert\020\224\003\022\013\n\006Search\020\364\003\022\021\n\014Sea" - "rchResult\020\365\003\022\022\n\rGetIndexState\020\366\003\022\032\n\025GetI" - "ndexBuildProgress\020\367\003\022\034\n\027GetCollectionSta" - "tistics\020\370\003\022\033\n\026GetPartitionStatistics\020\371\003\022" - "\r\n\010Retrieve\020\372\003\022\023\n\016RetrieveResult\020\373\003\022\024\n\017W" - "atchDmChannels\020\374\003\022\025\n\020RemoveDmChannels\020\375\003" - "\022\027\n\022WatchQueryChannels\020\376\003\022\030\n\023RemoveQuery" - "Channels\020\377\003\022\035\n\030SealedSegmentsChangeInfo\020" - "\200\004\022\027\n\022WatchDeltaChannels\020\201\004\022\024\n\017GetShardL" - "eaders\020\202\004\022\020\n\013GetReplicas\020\203\004\022\023\n\016UnsubDmCh" - "annel\020\204\004\022\024\n\017GetDistribution\020\205\004\022\025\n\020SyncDi" - "stribution\020\206\004\022\020\n\013SegmentInfo\020\330\004\022\017\n\nSyste" - "mInfo\020\331\004\022\024\n\017GetRecoveryInfo\020\332\004\022\024\n\017GetSeg" - "mentState\020\333\004\022\r\n\010TimeTick\020\260\t\022\023\n\016QueryNode" - "Stats\020\261\t\022\016\n\tLoadIndex\020\262\t\022\016\n\tRequestID\020\263\t" - "\022\017\n\nRequestTSO\020\264\t\022\024\n\017AllocateSegment\020\265\t\022" - "\026\n\021SegmentStatistics\020\266\t\022\025\n\020SegmentFlushD" - "one\020\267\t\022\017\n\nDataNodeTt\020\270\t\022\014\n\007Connect\020\271\t\022\024\n" - "\017ListClientInfos\020\272\t\022\023\n\016AllocTimestamp\020\273\t" - "\022\025\n\020CreateCredential\020\334\013\022\022\n\rGetCredential" - "\020\335\013\022\025\n\020DeleteCredential\020\336\013\022\025\n\020UpdateCred" - "ential\020\337\013\022\026\n\021ListCredUsernames\020\340\013\022\017\n\nCre" - "ateRole\020\300\014\022\r\n\010DropRole\020\301\014\022\024\n\017OperateUser" - "Role\020\302\014\022\017\n\nSelectRole\020\303\014\022\017\n\nSelectUser\020\304" - "\014\022\023\n\016SelectResource\020\305\014\022\025\n\020OperatePrivile" - "ge\020\306\014\022\020\n\013SelectGrant\020\307\014\022\033\n\026RefreshPolicy" - "InfoCache\020\310\014\022\017\n\nListPolicy\020\311\014\022\030\n\023CreateR" - "esourceGroup\020\244\r\022\026\n\021DropResourceGroup\020\245\r\022" - "\027\n\022ListResourceGroups\020\246\r\022\032\n\025DescribeReso" - "urceGroup\020\247\r\022\021\n\014TransferNode\020\250\r\022\024\n\017Trans" - "ferReplica\020\251\r\022\023\n\016CreateDatabase\020\211\016\022\021\n\014Dr" - "opDatabase\020\212\016\022\022\n\rListDatabases\020\213\016*\"\n\007Dsl" - "Type\022\007\n\003Dsl\020\000\022\016\n\nBoolExprV1\020\001*B\n\017Compact" - "ionState\022\021\n\rUndefiedState\020\000\022\r\n\tExecuting" - "\020\001\022\r\n\tCompleted\020\002*X\n\020ConsistencyLevel\022\n\n" - "\006Strong\020\000\022\013\n\007Session\020\001\022\013\n\007Bounded\020\002\022\016\n\nE" - "ventually\020\003\022\016\n\nCustomized\020\004*\236\001\n\013ImportSt" - "ate\022\021\n\rImportPending\020\000\022\020\n\014ImportFailed\020\001" - "\022\021\n\rImportStarted\020\002\022\023\n\017ImportPersisted\020\005" - "\022\021\n\rImportFlushed\020\010\022\023\n\017ImportCompleted\020\006" - "\022\032\n\026ImportFailedAndCleaned\020\007*2\n\nObjectTy" - "pe\022\016\n\nCollection\020\000\022\n\n\006Global\020\001\022\010\n\004User\020\002" - "*\241\010\n\017ObjectPrivilege\022\020\n\014PrivilegeAll\020\000\022\035" - "\n\031PrivilegeCreateCollection\020\001\022\033\n\027Privile" - "geDropCollection\020\002\022\037\n\033PrivilegeDescribeC" - "ollection\020\003\022\034\n\030PrivilegeShowCollections\020" - "\004\022\021\n\rPrivilegeLoad\020\005\022\024\n\020PrivilegeRelease" - "\020\006\022\027\n\023PrivilegeCompaction\020\007\022\023\n\017Privilege" - "Insert\020\010\022\023\n\017PrivilegeDelete\020\t\022\032\n\026Privile" - "geGetStatistics\020\n\022\030\n\024PrivilegeCreateInde" - "x\020\013\022\030\n\024PrivilegeIndexDetail\020\014\022\026\n\022Privile" - "geDropIndex\020\r\022\023\n\017PrivilegeSearch\020\016\022\022\n\016Pr" - "ivilegeFlush\020\017\022\022\n\016PrivilegeQuery\020\020\022\030\n\024Pr" - "ivilegeLoadBalance\020\021\022\023\n\017PrivilegeImport\020" - "\022\022\034\n\030PrivilegeCreateOwnership\020\023\022\027\n\023Privi" - "legeUpdateUser\020\024\022\032\n\026PrivilegeDropOwnersh" - "ip\020\025\022\034\n\030PrivilegeSelectOwnership\020\026\022\034\n\030Pr" - "ivilegeManageOwnership\020\027\022\027\n\023PrivilegeSel" - "ectUser\020\030\022\023\n\017PrivilegeUpsert\020\031\022 \n\034Privil" - "egeCreateResourceGroup\020\032\022\036\n\032PrivilegeDro" - "pResourceGroup\020\033\022\"\n\036PrivilegeDescribeRes" - "ourceGroup\020\034\022\037\n\033PrivilegeListResourceGro" - "ups\020\035\022\031\n\025PrivilegeTransferNode\020\036\022\034\n\030Priv" - "ilegeTransferReplica\020\037\022\037\n\033PrivilegeGetLo" - "adingProgress\020 \022\031\n\025PrivilegeGetLoadState" - "\020!\022\035\n\031PrivilegeRenameCollection\020\"\022\033\n\027Pri" - "vilegeCreateDatabase\020#\022\031\n\025PrivilegeDropD" - "atabase\020$\022\032\n\026PrivilegeListDatabases\020%\022\025\n" - "\021PrivilegeFlushAll\020&*S\n\tStateCode\022\020\n\014Ini" - "tializing\020\000\022\013\n\007Healthy\020\001\022\014\n\010Abnormal\020\002\022\013" - "\n\007StandBy\020\003\022\014\n\010Stopping\020\004*c\n\tLoadState\022\025" - "\n\021LoadStateNotExist\020\000\022\024\n\020LoadStateNotLoa" - "d\020\001\022\024\n\020LoadStateLoading\020\002\022\023\n\017LoadStateLo" - "aded\020\003:^\n\021privilege_ext_obj\022\037.google.pro" - "tobuf.MessageOptions\030\351\007 \001(\0132!.milvus.pro" - "to.common.PrivilegeExtBm\n\016io.milvus.grpc" - "B\013CommonProtoP\001Z4github.com/milvus-io/mi" - "lvus-proto/go-api/v2/commonpb\240\001\001\252\002\022Milvu" - "s.Client.Grpcb\006proto3" + "ort\030\002 \001(\003\"\177\n\007MsgBase\022.\n\010msg_type\030\001 \001(\0162\034" + ".milvus.proto.common.MsgType\022\r\n\005msgID\030\002 " + "\001(\003\022\021\n\ttimestamp\030\003 \001(\004\022\020\n\010sourceID\030\004 \001(\003" + "\022\020\n\010targetID\030\005 \001(\003\"7\n\tMsgHeader\022*\n\004base\030" + "\001 \001(\0132\034.milvus.proto.common.MsgBase\"M\n\014D" + "MLMsgHeader\022*\n\004base\030\001 \001(\0132\034.milvus.proto" + ".common.MsgBase\022\021\n\tshardName\030\002 \001(\t\"\273\001\n\014P" + "rivilegeExt\0224\n\013object_type\030\001 \001(\0162\037.milvu" + "s.proto.common.ObjectType\022>\n\020object_priv" + "ilege\030\002 \001(\0162$.milvus.proto.common.Object" + "Privilege\022\031\n\021object_name_index\030\003 \001(\005\022\032\n\022" + "object_name_indexs\030\004 \001(\005\"2\n\014SegmentStats" + "\022\021\n\tSegmentID\030\001 \001(\003\022\017\n\007NumRows\030\002 \001(\003\"\325\001\n" + "\nClientInfo\022\020\n\010sdk_type\030\001 \001(\t\022\023\n\013sdk_ver" + "sion\030\002 \001(\t\022\022\n\nlocal_time\030\003 \001(\t\022\014\n\004user\030\004" + " \001(\t\022\014\n\004host\030\005 \001(\t\022\?\n\010reserved\030\006 \003(\0132-.m" + "ilvus.proto.common.ClientInfo.ReservedEn" + "try\032/\n\rReservedEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + "ue\030\002 \001(\t:\0028\001\"\343\001\n\nServerInfo\022\022\n\nbuild_tag" + "s\030\001 \001(\t\022\022\n\nbuild_time\030\002 \001(\t\022\022\n\ngit_commi" + "t\030\003 \001(\t\022\022\n\ngo_version\030\004 \001(\t\022\023\n\013deploy_mo" + "de\030\005 \001(\t\022\?\n\010reserved\030\006 \003(\0132-.milvus.prot" + "o.common.ServerInfo.ReservedEntry\032/\n\rRes" + "ervedEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + "8\001*\303\n\n\tErrorCode\022\013\n\007Success\020\000\022\023\n\017Unexpec" + "tedError\020\001\022\021\n\rConnectFailed\020\002\022\024\n\020Permiss" + "ionDenied\020\003\022\027\n\023CollectionNotExists\020\004\022\023\n\017" + "IllegalArgument\020\005\022\024\n\020IllegalDimension\020\007\022" + "\024\n\020IllegalIndexType\020\010\022\031\n\025IllegalCollecti" + "onName\020\t\022\017\n\013IllegalTOPK\020\n\022\024\n\020IllegalRowR" + "ecord\020\013\022\023\n\017IllegalVectorID\020\014\022\027\n\023IllegalS" + "earchResult\020\r\022\020\n\014FileNotFound\020\016\022\016\n\nMetaF" + "ailed\020\017\022\017\n\013CacheFailed\020\020\022\026\n\022CannotCreate" + "Folder\020\021\022\024\n\020CannotCreateFile\020\022\022\026\n\022Cannot" + "DeleteFolder\020\023\022\024\n\020CannotDeleteFile\020\024\022\023\n\017" + "BuildIndexError\020\025\022\020\n\014IllegalNLIST\020\026\022\025\n\021I" + "llegalMetricType\020\027\022\017\n\013OutOfMemory\020\030\022\021\n\rI" + "ndexNotExist\020\031\022\023\n\017EmptyCollection\020\032\022\033\n\027U" + "pdateImportTaskFailure\020\033\022\032\n\026CollectionNa" + "meNotFound\020\034\022\033\n\027CreateCredentialFailure\020" + "\035\022\033\n\027UpdateCredentialFailure\020\036\022\033\n\027Delete" + "CredentialFailure\020\037\022\030\n\024GetCredentialFail" + "ure\020 \022\030\n\024ListCredUsersFailure\020!\022\022\n\016GetUs" + "erFailure\020\"\022\025\n\021CreateRoleFailure\020#\022\023\n\017Dr" + "opRoleFailure\020$\022\032\n\026OperateUserRoleFailur" + "e\020%\022\025\n\021SelectRoleFailure\020&\022\025\n\021SelectUser" + "Failure\020\'\022\031\n\025SelectResourceFailure\020(\022\033\n\027" + "OperatePrivilegeFailure\020)\022\026\n\022SelectGrant" + "Failure\020*\022!\n\035RefreshPolicyInfoCacheFailu" + "re\020+\022\025\n\021ListPolicyFailure\020,\022\022\n\016NotShardL" + "eader\020-\022\026\n\022NoReplicaAvailable\020.\022\023\n\017Segme" + "ntNotFound\020/\022\r\n\tForceDeny\0200\022\r\n\tRateLimit" + "\0201\022\022\n\016NodeIDNotMatch\0202\022\024\n\020UpsertAutoIDTr" + "ue\0203\022\034\n\030InsufficientMemoryToLoad\0204\022\030\n\024Me" + "moryQuotaExhausted\0205\022\026\n\022DiskQuotaExhaust" + "ed\0206\022\025\n\021TimeTickLongDelay\0207\022\021\n\rNotReadyS" + "erve\0208\022\033\n\027NotReadyCoordActivating\0209\022\017\n\013D" + "ataCoordNA\020d\022\022\n\rDDRequestRace\020\350\007*c\n\nInde" + "xState\022\022\n\016IndexStateNone\020\000\022\014\n\010Unissued\020\001" + "\022\016\n\nInProgress\020\002\022\014\n\010Finished\020\003\022\n\n\006Failed" + "\020\004\022\t\n\005Retry\020\005*\202\001\n\014SegmentState\022\024\n\020Segmen" + "tStateNone\020\000\022\014\n\010NotExist\020\001\022\013\n\007Growing\020\002\022" + "\n\n\006Sealed\020\003\022\013\n\007Flushed\020\004\022\014\n\010Flushing\020\005\022\013" + "\n\007Dropped\020\006\022\r\n\tImporting\020\007*i\n\017Placeholde" + "rType\022\010\n\004None\020\000\022\020\n\014BinaryVector\020d\022\017\n\013Flo" + "atVector\020e\022\021\n\rFloat16Vector\020f\022\t\n\005Int64\020\005" + "\022\013\n\007VarChar\020\025*\264\020\n\007MsgType\022\r\n\tUndefined\020\000" + "\022\024\n\020CreateCollection\020d\022\022\n\016DropCollection" + "\020e\022\021\n\rHasCollection\020f\022\026\n\022DescribeCollect" + "ion\020g\022\023\n\017ShowCollections\020h\022\024\n\020GetSystemC" + "onfigs\020i\022\022\n\016LoadCollection\020j\022\025\n\021ReleaseC" + "ollection\020k\022\017\n\013CreateAlias\020l\022\r\n\tDropAlia" + "s\020m\022\016\n\nAlterAlias\020n\022\023\n\017AlterCollection\020o" + "\022\024\n\020RenameCollection\020p\022\021\n\rDescribeAlias\020" + "q\022\017\n\013ListAliases\020r\022\024\n\017CreatePartition\020\310\001" + "\022\022\n\rDropPartition\020\311\001\022\021\n\014HasPartition\020\312\001\022" + "\026\n\021DescribePartition\020\313\001\022\023\n\016ShowPartition" + "s\020\314\001\022\023\n\016LoadPartitions\020\315\001\022\026\n\021ReleasePart" + "itions\020\316\001\022\021\n\014ShowSegments\020\372\001\022\024\n\017Describe" + "Segment\020\373\001\022\021\n\014LoadSegments\020\374\001\022\024\n\017Release" + "Segments\020\375\001\022\024\n\017HandoffSegments\020\376\001\022\030\n\023Loa" + "dBalanceSegments\020\377\001\022\025\n\020DescribeSegments\020" + "\200\002\022\034\n\027FederListIndexedSegment\020\201\002\022\"\n\035Fede" + "rDescribeSegmentIndexData\020\202\002\022\020\n\013CreateIn" + "dex\020\254\002\022\022\n\rDescribeIndex\020\255\002\022\016\n\tDropIndex\020" + "\256\002\022\027\n\022GetIndexStatistics\020\257\002\022\013\n\006Insert\020\220\003" + "\022\013\n\006Delete\020\221\003\022\n\n\005Flush\020\222\003\022\027\n\022ResendSegme" + "ntStats\020\223\003\022\013\n\006Upsert\020\224\003\022\013\n\006Search\020\364\003\022\021\n\014" + "SearchResult\020\365\003\022\022\n\rGetIndexState\020\366\003\022\032\n\025G" + "etIndexBuildProgress\020\367\003\022\034\n\027GetCollection" + "Statistics\020\370\003\022\033\n\026GetPartitionStatistics\020" + "\371\003\022\r\n\010Retrieve\020\372\003\022\023\n\016RetrieveResult\020\373\003\022\024" + "\n\017WatchDmChannels\020\374\003\022\025\n\020RemoveDmChannels" + "\020\375\003\022\027\n\022WatchQueryChannels\020\376\003\022\030\n\023RemoveQu" + "eryChannels\020\377\003\022\035\n\030SealedSegmentsChangeIn" + "fo\020\200\004\022\027\n\022WatchDeltaChannels\020\201\004\022\024\n\017GetSha" + "rdLeaders\020\202\004\022\020\n\013GetReplicas\020\203\004\022\023\n\016UnsubD" + "mChannel\020\204\004\022\024\n\017GetDistribution\020\205\004\022\025\n\020Syn" + "cDistribution\020\206\004\022\020\n\013SegmentInfo\020\330\004\022\017\n\nSy" + "stemInfo\020\331\004\022\024\n\017GetRecoveryInfo\020\332\004\022\024\n\017Get" + "SegmentState\020\333\004\022\r\n\010TimeTick\020\260\t\022\023\n\016QueryN" + "odeStats\020\261\t\022\016\n\tLoadIndex\020\262\t\022\016\n\tRequestID" + "\020\263\t\022\017\n\nRequestTSO\020\264\t\022\024\n\017AllocateSegment\020" + "\265\t\022\026\n\021SegmentStatistics\020\266\t\022\025\n\020SegmentFlu" + "shDone\020\267\t\022\017\n\nDataNodeTt\020\270\t\022\014\n\007Connect\020\271\t" + "\022\024\n\017ListClientInfos\020\272\t\022\023\n\016AllocTimestamp" + "\020\273\t\022\025\n\020CreateCredential\020\334\013\022\022\n\rGetCredent" + "ial\020\335\013\022\025\n\020DeleteCredential\020\336\013\022\025\n\020UpdateC" + "redential\020\337\013\022\026\n\021ListCredUsernames\020\340\013\022\017\n\n" + "CreateRole\020\300\014\022\r\n\010DropRole\020\301\014\022\024\n\017OperateU" + "serRole\020\302\014\022\017\n\nSelectRole\020\303\014\022\017\n\nSelectUse" + "r\020\304\014\022\023\n\016SelectResource\020\305\014\022\025\n\020OperatePriv" + "ilege\020\306\014\022\020\n\013SelectGrant\020\307\014\022\033\n\026RefreshPol" + "icyInfoCache\020\310\014\022\017\n\nListPolicy\020\311\014\022\030\n\023Crea" + "teResourceGroup\020\244\r\022\026\n\021DropResourceGroup\020" + "\245\r\022\027\n\022ListResourceGroups\020\246\r\022\032\n\025DescribeR" + "esourceGroup\020\247\r\022\021\n\014TransferNode\020\250\r\022\024\n\017Tr" + "ansferReplica\020\251\r\022\023\n\016CreateDatabase\020\211\016\022\021\n" + "\014DropDatabase\020\212\016\022\022\n\rListDatabases\020\213\016*\"\n\007" + "DslType\022\007\n\003Dsl\020\000\022\016\n\nBoolExprV1\020\001*B\n\017Comp" + "actionState\022\021\n\rUndefiedState\020\000\022\r\n\tExecut" + "ing\020\001\022\r\n\tCompleted\020\002*X\n\020ConsistencyLevel" + "\022\n\n\006Strong\020\000\022\013\n\007Session\020\001\022\013\n\007Bounded\020\002\022\016" + "\n\nEventually\020\003\022\016\n\nCustomized\020\004*\236\001\n\013Impor" + "tState\022\021\n\rImportPending\020\000\022\020\n\014ImportFaile" + "d\020\001\022\021\n\rImportStarted\020\002\022\023\n\017ImportPersiste" + "d\020\005\022\021\n\rImportFlushed\020\010\022\023\n\017ImportComplete" + "d\020\006\022\032\n\026ImportFailedAndCleaned\020\007*2\n\nObjec" + "tType\022\016\n\nCollection\020\000\022\n\n\006Global\020\001\022\010\n\004Use" + "r\020\002*\241\010\n\017ObjectPrivilege\022\020\n\014PrivilegeAll\020" + "\000\022\035\n\031PrivilegeCreateCollection\020\001\022\033\n\027Priv" + "ilegeDropCollection\020\002\022\037\n\033PrivilegeDescri" + "beCollection\020\003\022\034\n\030PrivilegeShowCollectio" + "ns\020\004\022\021\n\rPrivilegeLoad\020\005\022\024\n\020PrivilegeRele" + "ase\020\006\022\027\n\023PrivilegeCompaction\020\007\022\023\n\017Privil" + "egeInsert\020\010\022\023\n\017PrivilegeDelete\020\t\022\032\n\026Priv" + "ilegeGetStatistics\020\n\022\030\n\024PrivilegeCreateI" + "ndex\020\013\022\030\n\024PrivilegeIndexDetail\020\014\022\026\n\022Priv" + "ilegeDropIndex\020\r\022\023\n\017PrivilegeSearch\020\016\022\022\n" + "\016PrivilegeFlush\020\017\022\022\n\016PrivilegeQuery\020\020\022\030\n" + "\024PrivilegeLoadBalance\020\021\022\023\n\017PrivilegeImpo" + "rt\020\022\022\034\n\030PrivilegeCreateOwnership\020\023\022\027\n\023Pr" + "ivilegeUpdateUser\020\024\022\032\n\026PrivilegeDropOwne" + "rship\020\025\022\034\n\030PrivilegeSelectOwnership\020\026\022\034\n" + "\030PrivilegeManageOwnership\020\027\022\027\n\023Privilege" + "SelectUser\020\030\022\023\n\017PrivilegeUpsert\020\031\022 \n\034Pri" + "vilegeCreateResourceGroup\020\032\022\036\n\032Privilege" + "DropResourceGroup\020\033\022\"\n\036PrivilegeDescribe" + "ResourceGroup\020\034\022\037\n\033PrivilegeListResource" + "Groups\020\035\022\031\n\025PrivilegeTransferNode\020\036\022\034\n\030P" + "rivilegeTransferReplica\020\037\022\037\n\033PrivilegeGe" + "tLoadingProgress\020 \022\031\n\025PrivilegeGetLoadSt" + "ate\020!\022\035\n\031PrivilegeRenameCollection\020\"\022\033\n\027" + "PrivilegeCreateDatabase\020#\022\031\n\025PrivilegeDr" + "opDatabase\020$\022\032\n\026PrivilegeListDatabases\020%" + "\022\025\n\021PrivilegeFlushAll\020&*S\n\tStateCode\022\020\n\014" + "Initializing\020\000\022\013\n\007Healthy\020\001\022\014\n\010Abnormal\020" + "\002\022\013\n\007StandBy\020\003\022\014\n\010Stopping\020\004*c\n\tLoadStat" + "e\022\025\n\021LoadStateNotExist\020\000\022\024\n\020LoadStateNot" + "Load\020\001\022\024\n\020LoadStateLoading\020\002\022\023\n\017LoadStat" + "eLoaded\020\003:^\n\021privilege_ext_obj\022\037.google." + "protobuf.MessageOptions\030\351\007 \001(\0132!.milvus." + "proto.common.PrivilegeExtBm\n\016io.milvus.g" + "rpcB\013CommonProtoP\001Z4github.com/milvus-io" + "/milvus-proto/go-api/v2/commonpb\240\001\001\252\002\022Mi" + "lvus.Client.Grpcb\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_common_2eproto_deps[1] = { &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto, }; static ::_pbi::once_flag descriptor_table_common_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_common_2eproto = { - false, false, 7341, descriptor_table_protodef_common_2eproto, + false, false, 7104, descriptor_table_protodef_common_2eproto, "common.proto", - &descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_deps, 1, 18, + &descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_deps, 1, 16, schemas, file_default_instances, TableStruct_common_2eproto::offsets, file_level_metadata_common_2eproto, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto, @@ -2755,45 +2698,21 @@ void Address::InternalSwap(Address* other) { // =================================================================== -MsgBase_PropertiesEntry_DoNotUse::MsgBase_PropertiesEntry_DoNotUse() {} -MsgBase_PropertiesEntry_DoNotUse::MsgBase_PropertiesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void MsgBase_PropertiesEntry_DoNotUse::MergeFrom(const MsgBase_PropertiesEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata MsgBase_PropertiesEntry_DoNotUse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[7]); -} - -// =================================================================== - class MsgBase::_Internal { public: - static const ::milvus::proto::common::ReplicateInfo& replicateinfo(const MsgBase* msg); }; -const ::milvus::proto::common::ReplicateInfo& -MsgBase::_Internal::replicateinfo(const MsgBase* msg) { - return *msg->_impl_.replicateinfo_; -} MsgBase::MsgBase(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - if (arena != nullptr && !is_message_owned) { - arena->OwnCustomDestructor(this, &MsgBase::ArenaDtor); - } // @@protoc_insertion_point(arena_constructor:milvus.proto.common.MsgBase) } MsgBase::MsgBase(const MsgBase& from) : ::PROTOBUF_NAMESPACE_ID::Message() { MsgBase* const _this = this; (void)_this; new (&_impl_) Impl_{ - /*decltype(_impl_.properties_)*/{} - , decltype(_impl_.replicateinfo_){nullptr} - , decltype(_impl_.msgid_){} + decltype(_impl_.msgid_){} , decltype(_impl_.timestamp_){} , decltype(_impl_.sourceid_){} , decltype(_impl_.targetid_){} @@ -2801,10 +2720,6 @@ MsgBase::MsgBase(const MsgBase& from) , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.properties_.MergeFrom(from._impl_.properties_); - if (from._internal_has_replicateinfo()) { - _this->_impl_.replicateinfo_ = new ::milvus::proto::common::ReplicateInfo(*from._impl_.replicateinfo_); - } ::memcpy(&_impl_.msgid_, &from._impl_.msgid_, static_cast(reinterpret_cast(&_impl_.msg_type_) - reinterpret_cast(&_impl_.msgid_)) + sizeof(_impl_.msg_type_)); @@ -2816,9 +2731,7 @@ inline void MsgBase::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - /*decltype(_impl_.properties_)*/{::_pbi::ArenaInitialized(), arena} - , decltype(_impl_.replicateinfo_){nullptr} - , decltype(_impl_.msgid_){int64_t{0}} + decltype(_impl_.msgid_){int64_t{0}} , decltype(_impl_.timestamp_){uint64_t{0u}} , decltype(_impl_.sourceid_){int64_t{0}} , decltype(_impl_.targetid_){int64_t{0}} @@ -2831,7 +2744,6 @@ MsgBase::~MsgBase() { // @@protoc_insertion_point(destructor:milvus.proto.common.MsgBase) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; - ArenaDtor(this); return; } SharedDtor(); @@ -2839,15 +2751,8 @@ MsgBase::~MsgBase() { inline void MsgBase::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.properties_.Destruct(); - _impl_.properties_.~MapField(); - if (this != internal_default_instance()) delete _impl_.replicateinfo_; } -void MsgBase::ArenaDtor(void* object) { - MsgBase* _this = reinterpret_cast< MsgBase* >(object); - _this->_impl_.properties_.Destruct(); -} void MsgBase::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } @@ -2858,11 +2763,6 @@ void MsgBase::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.properties_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.replicateinfo_ != nullptr) { - delete _impl_.replicateinfo_; - } - _impl_.replicateinfo_ = nullptr; ::memset(&_impl_.msgid_, 0, static_cast( reinterpret_cast(&_impl_.msg_type_) - reinterpret_cast(&_impl_.msgid_)) + sizeof(_impl_.msg_type_)); @@ -2916,27 +2816,6 @@ const char* MsgBase::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; - // map properties = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&_impl_.properties_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); - } else - goto handle_unusual; - continue; - // .milvus.proto.common.ReplicateInfo replicateInfo = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { - ptr = ctx->ParseMessage(_internal_mutable_replicateinfo(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -2997,43 +2876,6 @@ uint8_t* MsgBase::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_targetid(), target); } - // map properties = 6; - if (!this->_internal_properties().empty()) { - using MapType = ::_pb::Map; - using WireHelper = MsgBase_PropertiesEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_properties(); - auto check_utf8 = [](const MapType::value_type& entry) { - (void)entry; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.common.MsgBase.PropertiesEntry.key"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.second.data(), static_cast(entry.second.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "milvus.proto.common.MsgBase.PropertiesEntry.value"); - }; - - if (stream->IsSerializationDeterministic() && map_field.size() > 1) { - for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { - target = WireHelper::InternalSerialize(6, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } else { - for (const auto& entry : map_field) { - target = WireHelper::InternalSerialize(6, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } - } - - // .milvus.proto.common.ReplicateInfo replicateInfo = 7; - if (this->_internal_has_replicateinfo()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(7, _Internal::replicateinfo(this), - _Internal::replicateinfo(this).GetCachedSize(), target, stream); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -3050,22 +2892,6 @@ size_t MsgBase::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // map properties = 6; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_properties_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_properties().begin(); - it != this->_internal_properties().end(); ++it) { - total_size += MsgBase_PropertiesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // .milvus.proto.common.ReplicateInfo replicateInfo = 7; - if (this->_internal_has_replicateinfo()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.replicateinfo_); - } - // int64 msgID = 2; if (this->_internal_msgid() != 0) { total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_msgid()); @@ -3110,11 +2936,6 @@ void MsgBase::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOB uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.properties_.MergeFrom(from._impl_.properties_); - if (from._internal_has_replicateinfo()) { - _this->_internal_mutable_replicateinfo()->::milvus::proto::common::ReplicateInfo::MergeFrom( - from._internal_replicateinfo()); - } if (from._internal_msgid() != 0) { _this->_internal_set_msgid(from._internal_msgid()); } @@ -3147,230 +2968,18 @@ bool MsgBase::IsInitialized() const { void MsgBase::InternalSwap(MsgBase* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.properties_.InternalSwap(&other->_impl_.properties_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(MsgBase, _impl_.msg_type_) + sizeof(MsgBase::_impl_.msg_type_) - - PROTOBUF_FIELD_OFFSET(MsgBase, _impl_.replicateinfo_)>( - reinterpret_cast(&_impl_.replicateinfo_), - reinterpret_cast(&other->_impl_.replicateinfo_)); + - PROTOBUF_FIELD_OFFSET(MsgBase, _impl_.msgid_)>( + reinterpret_cast(&_impl_.msgid_), + reinterpret_cast(&other->_impl_.msgid_)); } ::PROTOBUF_NAMESPACE_ID::Metadata MsgBase::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[8]); -} - -// =================================================================== - -class ReplicateInfo::_Internal { - public: -}; - -ReplicateInfo::ReplicateInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:milvus.proto.common.ReplicateInfo) -} -ReplicateInfo::ReplicateInfo(const ReplicateInfo& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ReplicateInfo* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.msgtimestamp_){} - , decltype(_impl_.isreplicate_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&_impl_.msgtimestamp_, &from._impl_.msgtimestamp_, - static_cast(reinterpret_cast(&_impl_.isreplicate_) - - reinterpret_cast(&_impl_.msgtimestamp_)) + sizeof(_impl_.isreplicate_)); - // @@protoc_insertion_point(copy_constructor:milvus.proto.common.ReplicateInfo) -} - -inline void ReplicateInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.msgtimestamp_){uint64_t{0u}} - , decltype(_impl_.isreplicate_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -ReplicateInfo::~ReplicateInfo() { - // @@protoc_insertion_point(destructor:milvus.proto.common.ReplicateInfo) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void ReplicateInfo::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void ReplicateInfo::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void ReplicateInfo::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.proto.common.ReplicateInfo) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&_impl_.msgtimestamp_, 0, static_cast( - reinterpret_cast(&_impl_.isreplicate_) - - reinterpret_cast(&_impl_.msgtimestamp_)) + sizeof(_impl_.isreplicate_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ReplicateInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // bool isReplicate = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.isreplicate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 msgTimestamp = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.msgtimestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ReplicateInfo::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.common.ReplicateInfo) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // bool isReplicate = 1; - if (this->_internal_isreplicate() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_isreplicate(), target); - } - - // uint64 msgTimestamp = 2; - if (this->_internal_msgtimestamp() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_msgtimestamp(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.common.ReplicateInfo) - return target; -} - -size_t ReplicateInfo::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.proto.common.ReplicateInfo) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // uint64 msgTimestamp = 2; - if (this->_internal_msgtimestamp() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_msgtimestamp()); - } - - // bool isReplicate = 1; - if (this->_internal_isreplicate() != 0) { - total_size += 1 + 1; - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReplicateInfo::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ReplicateInfo::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReplicateInfo::GetClassData() const { return &_class_data_; } - - -void ReplicateInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.common.ReplicateInfo) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_msgtimestamp() != 0) { - _this->_internal_set_msgtimestamp(from._internal_msgtimestamp()); - } - if (from._internal_isreplicate() != 0) { - _this->_internal_set_isreplicate(from._internal_isreplicate()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ReplicateInfo::CopyFrom(const ReplicateInfo& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.common.ReplicateInfo) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ReplicateInfo::IsInitialized() const { - return true; -} - -void ReplicateInfo::InternalSwap(ReplicateInfo* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(ReplicateInfo, _impl_.isreplicate_) - + sizeof(ReplicateInfo::_impl_.isreplicate_) - - PROTOBUF_FIELD_OFFSET(ReplicateInfo, _impl_.msgtimestamp_)>( - reinterpret_cast(&_impl_.msgtimestamp_), - reinterpret_cast(&other->_impl_.msgtimestamp_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ReplicateInfo::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[9]); + file_level_metadata_common_2eproto[7]); } // =================================================================== @@ -3563,7 +3172,7 @@ void MsgHeader::InternalSwap(MsgHeader* other) { ::PROTOBUF_NAMESPACE_ID::Metadata MsgHeader::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[10]); + file_level_metadata_common_2eproto[8]); } // =================================================================== @@ -3808,7 +3417,7 @@ void DMLMsgHeader::InternalSwap(DMLMsgHeader* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DMLMsgHeader::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[11]); + file_level_metadata_common_2eproto[9]); } // =================================================================== @@ -4073,7 +3682,7 @@ void PrivilegeExt::InternalSwap(PrivilegeExt* other) { ::PROTOBUF_NAMESPACE_ID::Metadata PrivilegeExt::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[12]); + file_level_metadata_common_2eproto[10]); } // =================================================================== @@ -4284,7 +3893,7 @@ void SegmentStats::InternalSwap(SegmentStats* other) { ::PROTOBUF_NAMESPACE_ID::Metadata SegmentStats::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[13]); + file_level_metadata_common_2eproto[11]); } // =================================================================== @@ -4298,7 +3907,7 @@ void ClientInfo_ReservedEntry_DoNotUse::MergeFrom(const ClientInfo_ReservedEntry ::PROTOBUF_NAMESPACE_ID::Metadata ClientInfo_ReservedEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[14]); + file_level_metadata_common_2eproto[12]); } // =================================================================== @@ -4769,7 +4378,7 @@ void ClientInfo::InternalSwap(ClientInfo* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ClientInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[15]); + file_level_metadata_common_2eproto[13]); } // =================================================================== @@ -4783,7 +4392,7 @@ void ServerInfo_ReservedEntry_DoNotUse::MergeFrom(const ServerInfo_ReservedEntry ::PROTOBUF_NAMESPACE_ID::Metadata ServerInfo_ReservedEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[16]); + file_level_metadata_common_2eproto[14]); } // =================================================================== @@ -5254,7 +4863,7 @@ void ServerInfo::InternalSwap(ServerInfo* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ServerInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_common_2eproto_getter, &descriptor_table_common_2eproto_once, - file_level_metadata_common_2eproto[17]); + file_level_metadata_common_2eproto[15]); } PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::MessageOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::milvus::proto::common::PrivilegeExt >, 11, false> @@ -5293,18 +4902,10 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::common::Address* Arena::CreateMaybeMessage< ::milvus::proto::common::Address >(Arena* arena) { return Arena::CreateMessageInternal< ::milvus::proto::common::Address >(arena); } -template<> PROTOBUF_NOINLINE ::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse* -Arena::CreateMaybeMessage< ::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse >(arena); -} template<> PROTOBUF_NOINLINE ::milvus::proto::common::MsgBase* Arena::CreateMaybeMessage< ::milvus::proto::common::MsgBase >(Arena* arena) { return Arena::CreateMessageInternal< ::milvus::proto::common::MsgBase >(arena); } -template<> PROTOBUF_NOINLINE ::milvus::proto::common::ReplicateInfo* -Arena::CreateMaybeMessage< ::milvus::proto::common::ReplicateInfo >(Arena* arena) { - return Arena::CreateMessageInternal< ::milvus::proto::common::ReplicateInfo >(arena); -} template<> PROTOBUF_NOINLINE ::milvus::proto::common::MsgHeader* Arena::CreateMaybeMessage< ::milvus::proto::common::MsgHeader >(Arena* arena) { return Arena::CreateMessageInternal< ::milvus::proto::common::MsgHeader >(arena); diff --git a/internal/core/src/pb/common.pb.h b/internal/core/src/pb/common.pb.h index 690bcf51a8..4e164b872f 100644 --- a/internal/core/src/pb/common.pb.h +++ b/internal/core/src/pb/common.pb.h @@ -76,9 +76,6 @@ extern KeyValuePairDefaultTypeInternal _KeyValuePair_default_instance_; class MsgBase; struct MsgBaseDefaultTypeInternal; extern MsgBaseDefaultTypeInternal _MsgBase_default_instance_; -class MsgBase_PropertiesEntry_DoNotUse; -struct MsgBase_PropertiesEntry_DoNotUseDefaultTypeInternal; -extern MsgBase_PropertiesEntry_DoNotUseDefaultTypeInternal _MsgBase_PropertiesEntry_DoNotUse_default_instance_; class MsgHeader; struct MsgHeaderDefaultTypeInternal; extern MsgHeaderDefaultTypeInternal _MsgHeader_default_instance_; @@ -91,9 +88,6 @@ extern PlaceholderValueDefaultTypeInternal _PlaceholderValue_default_instance_; class PrivilegeExt; struct PrivilegeExtDefaultTypeInternal; extern PrivilegeExtDefaultTypeInternal _PrivilegeExt_default_instance_; -class ReplicateInfo; -struct ReplicateInfoDefaultTypeInternal; -extern ReplicateInfoDefaultTypeInternal _ReplicateInfo_default_instance_; class SegmentStats; struct SegmentStatsDefaultTypeInternal; extern SegmentStatsDefaultTypeInternal _SegmentStats_default_instance_; @@ -118,12 +112,10 @@ template<> ::milvus::proto::common::DMLMsgHeader* Arena::CreateMaybeMessage<::mi template<> ::milvus::proto::common::KeyDataPair* Arena::CreateMaybeMessage<::milvus::proto::common::KeyDataPair>(Arena*); template<> ::milvus::proto::common::KeyValuePair* Arena::CreateMaybeMessage<::milvus::proto::common::KeyValuePair>(Arena*); template<> ::milvus::proto::common::MsgBase* Arena::CreateMaybeMessage<::milvus::proto::common::MsgBase>(Arena*); -template<> ::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse* Arena::CreateMaybeMessage<::milvus::proto::common::MsgBase_PropertiesEntry_DoNotUse>(Arena*); template<> ::milvus::proto::common::MsgHeader* Arena::CreateMaybeMessage<::milvus::proto::common::MsgHeader>(Arena*); template<> ::milvus::proto::common::PlaceholderGroup* Arena::CreateMaybeMessage<::milvus::proto::common::PlaceholderGroup>(Arena*); template<> ::milvus::proto::common::PlaceholderValue* Arena::CreateMaybeMessage<::milvus::proto::common::PlaceholderValue>(Arena*); template<> ::milvus::proto::common::PrivilegeExt* Arena::CreateMaybeMessage<::milvus::proto::common::PrivilegeExt>(Arena*); -template<> ::milvus::proto::common::ReplicateInfo* Arena::CreateMaybeMessage<::milvus::proto::common::ReplicateInfo>(Arena*); template<> ::milvus::proto::common::SegmentStats* Arena::CreateMaybeMessage<::milvus::proto::common::SegmentStats>(Arena*); template<> ::milvus::proto::common::ServerInfo* Arena::CreateMaybeMessage<::milvus::proto::common::ServerInfo>(Arena*); template<> ::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse* Arena::CreateMaybeMessage<::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse>(Arena*); @@ -1858,34 +1850,6 @@ class Address final : }; // ------------------------------------------------------------------- -class MsgBase_PropertiesEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - MsgBase_PropertiesEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR MsgBase_PropertiesEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit MsgBase_PropertiesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const MsgBase_PropertiesEntry_DoNotUse& other); - static const MsgBase_PropertiesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_MsgBase_PropertiesEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.proto.common.MsgBase.PropertiesEntry.key"); - } - static bool ValidateValue(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.proto.common.MsgBase.PropertiesEntry.value"); - } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - friend struct ::TableStruct_common_2eproto; -}; - -// ------------------------------------------------------------------- - class MsgBase final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.MsgBase) */ { public: @@ -1934,7 +1898,7 @@ class MsgBase final : &_MsgBase_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 7; friend void swap(MsgBase& a, MsgBase& b) { a.Swap(&b); @@ -1995,8 +1959,6 @@ class MsgBase final : protected: explicit MsgBase(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); - private: - static void ArenaDtor(void* object); public: static const ClassData _class_data_; @@ -2006,53 +1968,15 @@ class MsgBase final : // nested types ---------------------------------------------------- - // accessors ------------------------------------------------------- enum : int { - kPropertiesFieldNumber = 6, - kReplicateInfoFieldNumber = 7, kMsgIDFieldNumber = 2, kTimestampFieldNumber = 3, kSourceIDFieldNumber = 4, kTargetIDFieldNumber = 5, kMsgTypeFieldNumber = 1, }; - // map properties = 6; - int properties_size() const; - private: - int _internal_properties_size() const; - public: - void clear_properties(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_properties() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_properties(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - properties() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_properties(); - - // .milvus.proto.common.ReplicateInfo replicateInfo = 7; - bool has_replicateinfo() const; - private: - bool _internal_has_replicateinfo() const; - public: - void clear_replicateinfo(); - const ::milvus::proto::common::ReplicateInfo& replicateinfo() const; - PROTOBUF_NODISCARD ::milvus::proto::common::ReplicateInfo* release_replicateinfo(); - ::milvus::proto::common::ReplicateInfo* mutable_replicateinfo(); - void set_allocated_replicateinfo(::milvus::proto::common::ReplicateInfo* replicateinfo); - private: - const ::milvus::proto::common::ReplicateInfo& _internal_replicateinfo() const; - ::milvus::proto::common::ReplicateInfo* _internal_mutable_replicateinfo(); - public: - void unsafe_arena_set_allocated_replicateinfo( - ::milvus::proto::common::ReplicateInfo* replicateinfo); - ::milvus::proto::common::ReplicateInfo* unsafe_arena_release_replicateinfo(); - // int64 msgID = 2; void clear_msgid(); int64_t msgid() const; @@ -2106,12 +2030,6 @@ class MsgBase final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - MsgBase_PropertiesEntry_DoNotUse, - std::string, std::string, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> properties_; - ::milvus::proto::common::ReplicateInfo* replicateinfo_; int64_t msgid_; uint64_t timestamp_; int64_t sourceid_; @@ -2124,165 +2042,6 @@ class MsgBase final : }; // ------------------------------------------------------------------- -class ReplicateInfo final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.ReplicateInfo) */ { - public: - inline ReplicateInfo() : ReplicateInfo(nullptr) {} - ~ReplicateInfo() override; - explicit PROTOBUF_CONSTEXPR ReplicateInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ReplicateInfo(const ReplicateInfo& from); - ReplicateInfo(ReplicateInfo&& from) noexcept - : ReplicateInfo() { - *this = ::std::move(from); - } - - inline ReplicateInfo& operator=(const ReplicateInfo& from) { - CopyFrom(from); - return *this; - } - inline ReplicateInfo& operator=(ReplicateInfo&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ReplicateInfo& default_instance() { - return *internal_default_instance(); - } - static inline const ReplicateInfo* internal_default_instance() { - return reinterpret_cast( - &_ReplicateInfo_default_instance_); - } - static constexpr int kIndexInFileMessages = - 9; - - friend void swap(ReplicateInfo& a, ReplicateInfo& b) { - a.Swap(&b); - } - inline void Swap(ReplicateInfo* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ReplicateInfo* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ReplicateInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ReplicateInfo& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ReplicateInfo& from) { - ReplicateInfo::MergeImpl(*this, from); - } - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ReplicateInfo* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "milvus.proto.common.ReplicateInfo"; - } - protected: - explicit ReplicateInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kMsgTimestampFieldNumber = 2, - kIsReplicateFieldNumber = 1, - }; - // uint64 msgTimestamp = 2; - void clear_msgtimestamp(); - uint64_t msgtimestamp() const; - void set_msgtimestamp(uint64_t value); - private: - uint64_t _internal_msgtimestamp() const; - void _internal_set_msgtimestamp(uint64_t value); - public: - - // bool isReplicate = 1; - void clear_isreplicate(); - bool isreplicate() const; - void set_isreplicate(bool value); - private: - bool _internal_isreplicate() const; - void _internal_set_isreplicate(bool value); - public: - - // @@protoc_insertion_point(class_scope:milvus.proto.common.ReplicateInfo) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - uint64_t msgtimestamp_; - bool isreplicate_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; -}; -// ------------------------------------------------------------------- - class MsgHeader final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.MsgHeader) */ { public: @@ -2331,7 +2090,7 @@ class MsgHeader final : &_MsgHeader_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 8; friend void swap(MsgHeader& a, MsgHeader& b) { a.Swap(&b); @@ -2488,7 +2247,7 @@ class DMLMsgHeader final : &_DMLMsgHeader_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 9; friend void swap(DMLMsgHeader& a, DMLMsgHeader& b) { a.Swap(&b); @@ -2661,7 +2420,7 @@ class PrivilegeExt final : &_PrivilegeExt_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 10; friend void swap(PrivilegeExt& a, PrivilegeExt& b) { a.Swap(&b); @@ -2842,7 +2601,7 @@ class SegmentStats final : &_SegmentStats_default_instance_); } static constexpr int kIndexInFileMessages = - 13; + 11; friend void swap(SegmentStats& a, SegmentStats& b) { a.Swap(&b); @@ -3029,7 +2788,7 @@ class ClientInfo final : &_ClientInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 15; + 13; friend void swap(ClientInfo& a, ClientInfo& b) { a.Swap(&b); @@ -3300,7 +3059,7 @@ class ServerInfo final : &_ServerInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 17; + 15; friend void swap(ServerInfo& a, ServerInfo& b) { a.Swap(&b); @@ -4129,8 +3888,6 @@ inline void Address::set_port(int64_t value) { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // MsgBase // .milvus.proto.common.MsgType msg_type = 1; @@ -4233,169 +3990,6 @@ inline void MsgBase::set_targetid(int64_t value) { // @@protoc_insertion_point(field_set:milvus.proto.common.MsgBase.targetID) } -// map properties = 6; -inline int MsgBase::_internal_properties_size() const { - return _impl_.properties_.size(); -} -inline int MsgBase::properties_size() const { - return _internal_properties_size(); -} -inline void MsgBase::clear_properties() { - _impl_.properties_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -MsgBase::_internal_properties() const { - return _impl_.properties_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -MsgBase::properties() const { - // @@protoc_insertion_point(field_map:milvus.proto.common.MsgBase.properties) - return _internal_properties(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -MsgBase::_internal_mutable_properties() { - return _impl_.properties_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -MsgBase::mutable_properties() { - // @@protoc_insertion_point(field_mutable_map:milvus.proto.common.MsgBase.properties) - return _internal_mutable_properties(); -} - -// .milvus.proto.common.ReplicateInfo replicateInfo = 7; -inline bool MsgBase::_internal_has_replicateinfo() const { - return this != internal_default_instance() && _impl_.replicateinfo_ != nullptr; -} -inline bool MsgBase::has_replicateinfo() const { - return _internal_has_replicateinfo(); -} -inline void MsgBase::clear_replicateinfo() { - if (GetArenaForAllocation() == nullptr && _impl_.replicateinfo_ != nullptr) { - delete _impl_.replicateinfo_; - } - _impl_.replicateinfo_ = nullptr; -} -inline const ::milvus::proto::common::ReplicateInfo& MsgBase::_internal_replicateinfo() const { - const ::milvus::proto::common::ReplicateInfo* p = _impl_.replicateinfo_; - return p != nullptr ? *p : reinterpret_cast( - ::milvus::proto::common::_ReplicateInfo_default_instance_); -} -inline const ::milvus::proto::common::ReplicateInfo& MsgBase::replicateinfo() const { - // @@protoc_insertion_point(field_get:milvus.proto.common.MsgBase.replicateInfo) - return _internal_replicateinfo(); -} -inline void MsgBase::unsafe_arena_set_allocated_replicateinfo( - ::milvus::proto::common::ReplicateInfo* replicateinfo) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.replicateinfo_); - } - _impl_.replicateinfo_ = replicateinfo; - if (replicateinfo) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:milvus.proto.common.MsgBase.replicateInfo) -} -inline ::milvus::proto::common::ReplicateInfo* MsgBase::release_replicateinfo() { - - ::milvus::proto::common::ReplicateInfo* temp = _impl_.replicateinfo_; - _impl_.replicateinfo_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::milvus::proto::common::ReplicateInfo* MsgBase::unsafe_arena_release_replicateinfo() { - // @@protoc_insertion_point(field_release:milvus.proto.common.MsgBase.replicateInfo) - - ::milvus::proto::common::ReplicateInfo* temp = _impl_.replicateinfo_; - _impl_.replicateinfo_ = nullptr; - return temp; -} -inline ::milvus::proto::common::ReplicateInfo* MsgBase::_internal_mutable_replicateinfo() { - - if (_impl_.replicateinfo_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::proto::common::ReplicateInfo>(GetArenaForAllocation()); - _impl_.replicateinfo_ = p; - } - return _impl_.replicateinfo_; -} -inline ::milvus::proto::common::ReplicateInfo* MsgBase::mutable_replicateinfo() { - ::milvus::proto::common::ReplicateInfo* _msg = _internal_mutable_replicateinfo(); - // @@protoc_insertion_point(field_mutable:milvus.proto.common.MsgBase.replicateInfo) - return _msg; -} -inline void MsgBase::set_allocated_replicateinfo(::milvus::proto::common::ReplicateInfo* replicateinfo) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.replicateinfo_; - } - if (replicateinfo) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(replicateinfo); - if (message_arena != submessage_arena) { - replicateinfo = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, replicateinfo, submessage_arena); - } - - } else { - - } - _impl_.replicateinfo_ = replicateinfo; - // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.MsgBase.replicateInfo) -} - -// ------------------------------------------------------------------- - -// ReplicateInfo - -// bool isReplicate = 1; -inline void ReplicateInfo::clear_isreplicate() { - _impl_.isreplicate_ = false; -} -inline bool ReplicateInfo::_internal_isreplicate() const { - return _impl_.isreplicate_; -} -inline bool ReplicateInfo::isreplicate() const { - // @@protoc_insertion_point(field_get:milvus.proto.common.ReplicateInfo.isReplicate) - return _internal_isreplicate(); -} -inline void ReplicateInfo::_internal_set_isreplicate(bool value) { - - _impl_.isreplicate_ = value; -} -inline void ReplicateInfo::set_isreplicate(bool value) { - _internal_set_isreplicate(value); - // @@protoc_insertion_point(field_set:milvus.proto.common.ReplicateInfo.isReplicate) -} - -// uint64 msgTimestamp = 2; -inline void ReplicateInfo::clear_msgtimestamp() { - _impl_.msgtimestamp_ = uint64_t{0u}; -} -inline uint64_t ReplicateInfo::_internal_msgtimestamp() const { - return _impl_.msgtimestamp_; -} -inline uint64_t ReplicateInfo::msgtimestamp() const { - // @@protoc_insertion_point(field_get:milvus.proto.common.ReplicateInfo.msgTimestamp) - return _internal_msgtimestamp(); -} -inline void ReplicateInfo::_internal_set_msgtimestamp(uint64_t value) { - - _impl_.msgtimestamp_ = value; -} -inline void ReplicateInfo::set_msgtimestamp(uint64_t value) { - _internal_set_msgtimestamp(value); - // @@protoc_insertion_point(field_set:milvus.proto.common.ReplicateInfo.msgTimestamp) -} - // ------------------------------------------------------------------- // MsgHeader @@ -5365,10 +4959,6 @@ ServerInfo::mutable_reserved() { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) diff --git a/internal/distributed/proxy/httpserver/handler_v1_test.go b/internal/distributed/proxy/httpserver/handler_v1_test.go index 70e0fa371e..b42c5b76b8 100644 --- a/internal/distributed/proxy/httpserver/handler_v1_test.go +++ b/internal/distributed/proxy/httpserver/handler_v1_test.go @@ -333,7 +333,7 @@ func TestVectorCreateCollection(t *testing.T) { expectedBody: PrintErr(ErrDefault), }) - err := merr.WrapErrCollectionResourceLimitExceeded() + err := merr.WrapErrCollectionNumLimitExceeded(65535) mp2 := mocks.NewMockProxy(t) mp2.EXPECT().CreateCollection(mock.Anything, mock.Anything).Return(merr.Status(err), nil).Once() testCases = append(testCases, testCase{ @@ -1480,7 +1480,6 @@ func TestAuthorization(t *testing.T) { w := httptest.NewRecorder() testEngine.ServeHTTP(w, req) assert.Equal(t, http.StatusForbidden, w.Code) - assert.Equal(t, res, w.Body.String()) }) } } @@ -1501,7 +1500,6 @@ func TestAuthorization(t *testing.T) { w := httptest.NewRecorder() testEngine.ServeHTTP(w, req) assert.Equal(t, http.StatusForbidden, w.Code) - assert.Equal(t, res, w.Body.String()) }) } } @@ -1522,7 +1520,6 @@ func TestAuthorization(t *testing.T) { w := httptest.NewRecorder() testEngine.ServeHTTP(w, req) assert.Equal(t, http.StatusForbidden, w.Code) - assert.Equal(t, res, w.Body.String()) }) } } @@ -1533,7 +1530,7 @@ func TestAuthorization(t *testing.T) { versional(VectorCollectionsDescribePath) + "?collectionName=" + DefaultCollectionName, }, } - for res, pathArr := range paths { + for _, pathArr := range paths { for _, path := range pathArr { t.Run("proxy is not ready", func(t *testing.T) { mp := mocks.NewMockProxy(t) @@ -1543,7 +1540,6 @@ func TestAuthorization(t *testing.T) { w := httptest.NewRecorder() testEngine.ServeHTTP(w, req) assert.Equal(t, http.StatusForbidden, w.Code) - assert.Equal(t, res, w.Body.String()) }) } } @@ -1564,7 +1560,6 @@ func TestAuthorization(t *testing.T) { w := httptest.NewRecorder() testEngine.ServeHTTP(w, req) assert.Equal(t, http.StatusForbidden, w.Code) - assert.Equal(t, res, w.Body.String()) }) } } diff --git a/internal/proto/planpb/plan.pb.go b/internal/proto/planpb/plan.pb.go index 06de0040e9..2edfb4c927 100644 --- a/internal/proto/planpb/plan.pb.go +++ b/internal/proto/planpb/plan.pb.go @@ -237,6 +237,7 @@ func (BinaryExpr_BinaryOp) EnumDescriptor() ([]byte, []int) { type GenericValue struct { // Types that are valid to be assigned to Val: + // // *GenericValue_BoolVal // *GenericValue_Int64Val // *GenericValue_FloatVal @@ -1297,6 +1298,7 @@ var xxx_messageInfo_AlwaysTrueExpr proto.InternalMessageInfo type Expr struct { // Types that are valid to be assigned to Expr: + // // *Expr_TermExpr // *Expr_UnaryExpr // *Expr_BinaryExpr @@ -1668,6 +1670,7 @@ func (m *QueryPlanNode) GetLimit() int64 { type PlanNode struct { // Types that are valid to be assigned to Node: + // // *PlanNode_VectorAnns // *PlanNode_Predicates // *PlanNode_Query diff --git a/internal/proto/proxypb/proxy.pb.go b/internal/proto/proxypb/proxy.pb.go index 60ba4e6a11..c5cf24fd78 100644 --- a/internal/proto/proxypb/proxy.pb.go +++ b/internal/proto/proxypb/proxy.pb.go @@ -29,8 +29,9 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type InvalidateCollMetaCacheRequest struct { // MsgType: - // DropCollection -> {meta cache, dml channels} - // Other -> {meta cache} + // + // DropCollection -> {meta cache, dml channels} + // Other -> {meta cache} Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` DbName string `protobuf:"bytes,2,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"` diff --git a/internal/proto/rootcoordpb/root_coord.pb.go b/internal/proto/rootcoordpb/root_coord.pb.go index 7d16956e9b..ff74594ed2 100644 --- a/internal/proto/rootcoordpb/root_coord.pb.go +++ b/internal/proto/rootcoordpb/root_coord.pb.go @@ -793,28 +793,28 @@ type RootCoordClient interface { GetComponentStates(ctx context.Context, in *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, error) GetTimeTickChannel(ctx context.Context, in *internalpb.GetTimeTickChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) - //* + // * // @brief This method is used to create collection // // @param CreateCollectionRequest, use to provide collection information to be created. // // @return Status CreateCollection(ctx context.Context, in *milvuspb.CreateCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) - //* + // * // @brief This method is used to delete collection. // // @param DropCollectionRequest, collection name is going to be deleted. // // @return Status DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) - //* + // * // @brief This method is used to test collection existence. // // @param HasCollectionRequest, collection name is going to be tested. // // @return BoolResponse HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest, opts ...grpc.CallOption) (*milvuspb.BoolResponse, error) - //* + // * // @brief This method is used to get collection schema. // // @param DescribeCollectionRequest, target collection name. @@ -825,28 +825,28 @@ type RootCoordClient interface { CreateAlias(ctx context.Context, in *milvuspb.CreateAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error) DropAlias(ctx context.Context, in *milvuspb.DropAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error) AlterAlias(ctx context.Context, in *milvuspb.AlterAliasRequest, opts ...grpc.CallOption) (*commonpb.Status, error) - //* + // * // @brief This method is used to list all collections. // // @return StringListResponse, collection name list ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowCollectionsResponse, error) AlterCollection(ctx context.Context, in *milvuspb.AlterCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) - //* + // * // @brief This method is used to create partition // // @return Status CreatePartition(ctx context.Context, in *milvuspb.CreatePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) - //* + // * // @brief This method is used to drop partition // // @return Status DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) - //* + // * // @brief This method is used to test partition existence. // // @return BoolResponse HasPartition(ctx context.Context, in *milvuspb.HasPartitionRequest, opts ...grpc.CallOption) (*milvuspb.BoolResponse, error) - //* + // * // @brief This method is used to show partition information // // @param ShowPartitionRequest, target collection name. @@ -854,7 +854,7 @@ type RootCoordClient interface { // @return StringListResponse ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error) ShowPartitionsInternal(ctx context.Context, in *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error) - // rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {} + // rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {} ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest, opts ...grpc.CallOption) (*milvuspb.ShowSegmentsResponse, error) AllocTimestamp(ctx context.Context, in *AllocTimestampRequest, opts ...grpc.CallOption) (*AllocTimestampResponse, error) AllocID(ctx context.Context, in *AllocIDRequest, opts ...grpc.CallOption) (*AllocIDResponse, error) @@ -1327,28 +1327,28 @@ type RootCoordServer interface { GetComponentStates(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) GetTimeTickChannel(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) GetStatisticsChannel(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) - //* + // * // @brief This method is used to create collection // // @param CreateCollectionRequest, use to provide collection information to be created. // // @return Status CreateCollection(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) - //* + // * // @brief This method is used to delete collection. // // @param DropCollectionRequest, collection name is going to be deleted. // // @return Status DropCollection(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error) - //* + // * // @brief This method is used to test collection existence. // // @param HasCollectionRequest, collection name is going to be tested. // // @return BoolResponse HasCollection(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) - //* + // * // @brief This method is used to get collection schema. // // @param DescribeCollectionRequest, target collection name. @@ -1359,28 +1359,28 @@ type RootCoordServer interface { CreateAlias(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error) DropAlias(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error) AlterAlias(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error) - //* + // * // @brief This method is used to list all collections. // // @return StringListResponse, collection name list ShowCollections(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) AlterCollection(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error) - //* + // * // @brief This method is used to create partition // // @return Status CreatePartition(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) - //* + // * // @brief This method is used to drop partition // // @return Status DropPartition(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error) - //* + // * // @brief This method is used to test partition existence. // // @return BoolResponse HasPartition(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) - //* + // * // @brief This method is used to show partition information // // @param ShowPartitionRequest, target collection name. @@ -1388,7 +1388,7 @@ type RootCoordServer interface { // @return StringListResponse ShowPartitions(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) ShowPartitionsInternal(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) - // rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {} + // rpc DescribeSegment(milvus.DescribeSegmentRequest) returns (milvus.DescribeSegmentResponse) {} ShowSegments(context.Context, *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) AllocTimestamp(context.Context, *AllocTimestampRequest) (*AllocTimestampResponse, error) AllocID(context.Context, *AllocIDRequest) (*AllocIDResponse, error) diff --git a/internal/proxy/lb_policy.go b/internal/proxy/lb_policy.go index f81cab8c4a..417a2221fd 100644 --- a/internal/proxy/lb_policy.go +++ b/internal/proxy/lb_policy.go @@ -150,12 +150,17 @@ func (lb *LBPolicyImpl) ExecuteWithRetry(ctx context.Context, workload ChannelWo zap.String("channelName", workload.channel), ) + var lastErr error err := retry.Do(ctx, func() error { targetNode, err := lb.selectNode(ctx, workload, excludeNodes) if err != nil { log.Warn("failed to select node for shard", zap.Int64("nodeID", targetNode), - zap.Error(err)) + zap.Error(err), + ) + if lastErr != nil { + return lastErr + } return err } @@ -168,7 +173,8 @@ func (lb *LBPolicyImpl) ExecuteWithRetry(ctx context.Context, workload ChannelWo // cancel work load which assign to the target node lb.balancer.CancelWorkload(targetNode, workload.nq) - return errors.Wrapf(err, "failed to get delegator %d for channel %s", targetNode, workload.channel) + lastErr = errors.Wrapf(err, "failed to get delegator %d for channel %s", targetNode, workload.channel) + return lastErr } err = workload.exec(ctx, targetNode, client, workload.channel) @@ -179,7 +185,8 @@ func (lb *LBPolicyImpl) ExecuteWithRetry(ctx context.Context, workload ChannelWo excludeNodes.Insert(targetNode) lb.balancer.CancelWorkload(targetNode, workload.nq) - return errors.Wrapf(err, "failed to search/query delegator %d for channel %s", targetNode, workload.channel) + lastErr = errors.Wrapf(err, "failed to search/query delegator %d for channel %s", targetNode, workload.channel) + return lastErr } lb.balancer.CancelWorkload(targetNode, workload.nq) diff --git a/internal/querycoordv2/services_test.go b/internal/querycoordv2/services_test.go index f251c17e5a..8d2e350ab5 100644 --- a/internal/querycoordv2/services_test.go +++ b/internal/querycoordv2/services_test.go @@ -1267,7 +1267,6 @@ func (suite *ServiceSuite) TestLoadBalanceFailed() { resp, err := server.LoadBalance(ctx, req) suite.NoError(err) suite.Equal(commonpb.ErrorCode_UnexpectedError, resp.ErrorCode) - suite.Contains(resp.Reason, "failed to balance segments") suite.Contains(resp.Reason, "mock error") suite.meta.ReplicaManager.AddNode(replicas[0].ID, 10) diff --git a/internal/rootcoord/create_collection_task.go b/internal/rootcoord/create_collection_task.go index 5a8afcf093..667a211efa 100644 --- a/internal/rootcoord/create_collection_task.go +++ b/internal/rootcoord/create_collection_task.go @@ -89,7 +89,7 @@ func (t *createCollectionTask) validate() error { maxColNumPerDB := Params.QuotaConfig.MaxCollectionNumPerDB.GetAsInt() if len(collIDs) >= maxColNumPerDB { log.Warn("unable to create collection because the number of collection has reached the limit in DB", zap.Int("maxCollectionNumPerDB", maxColNumPerDB)) - return merr.WrapErrCollectionResourceLimitExceeded(fmt.Sprintf("Failed to create collection, maxCollectionNumPerDB={%d}", maxColNumPerDB)) + return merr.WrapErrCollectionNumLimitExceeded(maxColNumPerDB, "max number of collection has reached the limit in DB") } totalCollections := 0 @@ -100,7 +100,7 @@ func (t *createCollectionTask) validate() error { maxCollectionNum := Params.QuotaConfig.MaxCollectionNum.GetAsInt() if totalCollections >= maxCollectionNum { log.Warn("unable to create collection because the number of collection has reached the limit", zap.Int("max_collection_num", maxCollectionNum)) - return merr.WrapErrCollectionResourceLimitExceeded(fmt.Sprintf("Failed to create collection, limit={%d}", maxCollectionNum)) + return merr.WrapErrCollectionNumLimitExceeded(maxCollectionNum, "max number of collection has reached the limit") } return nil } diff --git a/internal/rootcoord/create_db_task.go b/internal/rootcoord/create_db_task.go index a324166c38..089c25c68f 100644 --- a/internal/rootcoord/create_db_task.go +++ b/internal/rootcoord/create_db_task.go @@ -18,7 +18,6 @@ package rootcoord import ( "context" - "fmt" "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" "github.com/milvus-io/milvus/internal/metastore/model" @@ -40,7 +39,7 @@ func (t *createDatabaseTask) Prepare(ctx context.Context) error { cfgMaxDatabaseNum := Params.RootCoordCfg.MaxDatabaseNum.GetAsInt() if len(dbs) > cfgMaxDatabaseNum { - return merr.WrapErrDatabaseResourceLimitExceeded(fmt.Sprintf("Failed to create database, limit={%d}", cfgMaxDatabaseNum)) + return merr.WrapErrDatabaseNumLimitExceeded(cfgMaxDatabaseNum) } t.dbID, err = t.core.idAllocator.AllocOne() diff --git a/pkg/go.mod b/pkg/go.mod index 4f27a8c261..f2f66b93bb 100644 --- a/pkg/go.mod +++ b/pkg/go.mod @@ -13,7 +13,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/klauspost/compress v1.16.5 github.com/lingdor/stackerror v0.0.0-20191119040541-976d8885ed76 - github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2-0.20231008032233-5d64d443769d + github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231114080011-9a495865219e github.com/nats-io/nats-server/v2 v2.9.17 github.com/nats-io/nats.go v1.24.0 github.com/panjf2000/ants/v2 v2.7.2 diff --git a/pkg/go.sum b/pkg/go.sum index 53dfd644f9..ae5a3c8e7d 100644 --- a/pkg/go.sum +++ b/pkg/go.sum @@ -479,6 +479,8 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2-0.20231008032233-5d64d443769d h1:K8yyzz8BCBm+wirhRgySyB8wN+sw33eB3VsLz6Slu5s= github.com/milvus-io/milvus-proto/go-api/v2 v2.3.2-0.20231008032233-5d64d443769d/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek= +github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231114080011-9a495865219e h1:IH1WAXwEF8vbwahPdupi4zzRNWViT4B7fZzIjtRLpG4= +github.com/milvus-io/milvus-proto/go-api/v2 v2.3.4-0.20231114080011-9a495865219e/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek= github.com/milvus-io/pulsar-client-go v0.6.10 h1:eqpJjU+/QX0iIhEo3nhOqMNXL+TyInAs1IAHZCrCM/A= github.com/milvus-io/pulsar-client-go v0.6.10/go.mod h1:lQqCkgwDF8YFYjKA+zOheTk1tev2B+bKj5j7+nm8M1w= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= diff --git a/pkg/util/merr/errors.go b/pkg/util/merr/errors.go index 4348ccec73..790fb20696 100644 --- a/pkg/util/merr/errors.go +++ b/pkg/util/merr/errors.go @@ -22,9 +22,8 @@ import ( ) const ( - retryableFlag = 1 << 16 - CanceledCode int32 = 10000 - TimeoutCode int32 = 10001 + CanceledCode int32 = 10000 + TimeoutCode int32 = 10001 ) // Define leaf errors here, @@ -146,17 +145,27 @@ var ( ) type milvusError struct { - msg string - errCode int32 + msg string + detail string + retriable bool + errCode int32 } func newMilvusError(msg string, code int32, retriable bool) milvusError { - if retriable { - code |= retryableFlag - } return milvusError{ - msg: msg, - errCode: code, + msg: msg, + detail: msg, + retriable: retriable, + errCode: code, + } +} + +func newMilvusErrorWithDetail(msg string, detail string, code int32, retriable bool) milvusError { + return milvusError{ + msg: msg, + detail: detail, + retriable: retriable, + errCode: code, } } @@ -168,6 +177,10 @@ func (e milvusError) Error() string { return e.msg } +func (e milvusError) Detail() string { + return e.detail +} + func (e milvusError) Is(err error) bool { cause := errors.Cause(err) if cause, ok := cause.(milvusError); ok { diff --git a/pkg/util/merr/utils.go b/pkg/util/merr/utils.go index a01479f5a7..1fd3afe3c2 100644 --- a/pkg/util/merr/utils.go +++ b/pkg/util/merr/utils.go @@ -18,6 +18,7 @@ package merr import ( "context" + "fmt" "strings" "github.com/cockroachdb/errors" @@ -51,11 +52,11 @@ func Code(err error) int32 { } func IsRetryableErr(err error) bool { - return IsRetryableCode(Code(err)) -} + if err, ok := err.(milvusError); ok { + return err.retriable + } -func IsRetryableCode(code int32) bool { - return code&retryableFlag != 0 + return false } func IsCanceledOrTimeout(err error) bool { @@ -72,12 +73,27 @@ func Status(err error) *commonpb.Status { code := Code(err) return &commonpb.Status{ Code: code, - Reason: err.Error(), + Reason: previousLastError(err).Error(), // Deprecated, for compatibility ErrorCode: oldCode(code), + Retriable: IsRetryableErr(err), + Detail: err.Error(), } } +func previousLastError(err error) error { + lastErr := err + for { + nextErr := errors.Unwrap(err) + if nextErr == nil { + break + } + lastErr = err + err = nextErr + } + return lastErr +} + func CheckRPCCall(resp any, err error) error { if err != nil { return err @@ -211,9 +227,9 @@ func Error(status *commonpb.Status) error { // use code first code := status.GetCode() if code == 0 { - return newMilvusError(status.GetReason(), Code(OldCodeToMerr(status.GetErrorCode())), false) + return newMilvusErrorWithDetail(status.GetReason(), status.GetDetail(), Code(OldCodeToMerr(status.GetErrorCode())), false) } - return newMilvusError(status.GetReason(), code, code&retryableFlag != 0) + return newMilvusErrorWithDetail(status.GetReason(), status.GetDetail(), code, status.GetRetriable()) } // CheckHealthy checks whether the state is healthy, @@ -273,352 +289,383 @@ func CheckTargetID(msg *commonpb.MsgBase) error { // Service related func WrapErrServiceNotReady(role string, sessionID int64, state string, msg ...string) error { - err := errors.Wrapf(ErrServiceNotReady, "%s=%d stage=%s", role, sessionID, state) + err := wrapFieldsWithDesc(ErrServiceNotReady, + state, + value(role, sessionID), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrServiceUnavailable(reason string, msg ...string) error { - err := errors.Wrap(ErrServiceUnavailable, reason) + err := wrapFieldsWithDesc(ErrServiceUnavailable, reason) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrServiceMemoryLimitExceeded(predict, limit float32, msg ...string) error { - err := errors.Wrapf(ErrServiceMemoryLimitExceeded, "predict=%v, limit=%v", predict, limit) + err := wrapFields(ErrServiceMemoryLimitExceeded, + value("predict", predict), + value("limit", limit), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrServiceRequestLimitExceeded(limit int32, msg ...string) error { - err := errors.Wrapf(ErrServiceRequestLimitExceeded, "limit=%v", limit) + err := wrapFields(ErrServiceRequestLimitExceeded, + value("limit", limit), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } -func WrapErrServiceInternal(msg string, others ...string) error { - msg = strings.Join(append([]string{msg}, others...), "; ") - err := errors.Wrap(ErrServiceInternal, msg) - +func WrapErrServiceInternal(reason string, msg ...string) error { + err := wrapFieldsWithDesc(ErrServiceInternal, reason) + if len(msg) > 0 { + err = errors.Wrap(err, strings.Join(msg, "->")) + } return err } func WrapErrServiceCrossClusterRouting(expectedCluster, actualCluster string, msg ...string) error { - err := errors.Wrapf(ErrServiceCrossClusterRouting, "expectedCluster=%s, actualCluster=%s", expectedCluster, actualCluster) + err := wrapFields(ErrServiceCrossClusterRouting, + value("expectedCluster", expectedCluster), + value("actualCluster", actualCluster), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrServiceDiskLimitExceeded(predict, limit float32, msg ...string) error { - err := errors.Wrapf(ErrServiceDiskLimitExceeded, "predict=%v, limit=%v", predict, limit) + err := wrapFields(ErrServiceDiskLimitExceeded, + value("predict", predict), + value("limit", limit), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrServiceRateLimit(rate float64) error { - err := errors.Wrapf(ErrServiceRateLimit, "rate=%v", rate) - return err + return wrapFields(ErrServiceRateLimit, value("rate", rate)) } func WrapErrServiceForceDeny(op string, reason error, method string) error { - err := errors.Wrapf(ErrServiceForceDeny, "deny to %s, reason: %s, req: %s", op, reason.Error(), method) - return err + return wrapFieldsWithDesc(ErrServiceForceDeny, + reason.Error(), + value("op", op), + value("req", method), + ) } func WrapErrServiceUnimplemented(grpcErr error) error { - err := errors.Wrapf(ErrServiceUnimplemented, "err: %s", grpcErr.Error()) - return err + return wrapFieldsWithDesc(ErrServiceUnimplemented, grpcErr.Error()) } // database related func WrapErrDatabaseNotFound(database any, msg ...string) error { - err := wrapWithField(ErrDatabaseNotFound, "database", database) + err := wrapFields(ErrDatabaseNotFound, value("database", database)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } -func WrapErrDatabaseResourceLimitExceeded(msg ...string) error { - var err error = ErrDatabaseNumLimitExceeded +func WrapErrDatabaseNumLimitExceeded(limit int, msg ...string) error { + err := wrapFields(ErrDatabaseNumLimitExceeded, value("limit", limit)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrDatabaseNameInvalid(database any, msg ...string) error { - err := wrapWithField(ErrDatabaseInvalidName, "database", database) + err := wrapFields(ErrDatabaseInvalidName, value("database", database)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Collection related func WrapErrCollectionNotFound(collection any, msg ...string) error { - err := wrapWithField(ErrCollectionNotFound, "collection", collection) + err := wrapFields(ErrCollectionNotFound, value("collection", collection)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrCollectionNotFoundWithDB(db any, collection any, msg ...string) error { - err := errors.Wrapf(ErrCollectionNotFound, "collection %v:%v", db, collection) + err := wrapFields(ErrCollectionNotFound, + value("database", db), + value("collection", collection), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrCollectionNotLoaded(collection any, msg ...string) error { - err := wrapWithField(ErrCollectionNotLoaded, "collection", collection) + err := wrapFields(ErrCollectionNotLoaded, value("collection", collection)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } -func WrapErrCollectionResourceLimitExceeded(msg ...string) error { - var err error = ErrCollectionNumLimitExceeded +func WrapErrCollectionNumLimitExceeded(limit int, msg ...string) error { + err := wrapFields(ErrCollectionNumLimitExceeded, value("limit", limit)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrCollectionNotFullyLoaded(collection any, msg ...string) error { - err := wrapWithField(ErrCollectionNotFullyLoaded, "collection", collection) + err := wrapFields(ErrCollectionNotFullyLoaded, value("collection", collection)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrAliasNotFound(db any, alias any, msg ...string) error { - err := errors.Wrapf(ErrAliasNotFound, "alias %v:%v", db, alias) + err := wrapFields(ErrAliasNotFound, + value("database", db), + value("alias", alias), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrAliasCollectionNameConflict(db any, alias any, msg ...string) error { - err := errors.Wrapf(ErrAliasCollectionNameConfilct, "alias %v:%v", db, alias) + err := wrapFields(ErrAliasCollectionNameConfilct, + value("database", db), + value("alias", alias), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrAliasAlreadyExist(db any, alias any, msg ...string) error { - err := errors.Wrapf(ErrAliasAlreadyExist, "alias %v:%v already exist", db, alias) + err := wrapFields(ErrAliasAlreadyExist, + value("database", db), + value("alias", alias), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Partition related func WrapErrPartitionNotFound(partition any, msg ...string) error { - err := wrapWithField(ErrPartitionNotFound, "partition", partition) + err := wrapFields(ErrPartitionNotFound, value("partition", partition)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrPartitionNotLoaded(partition any, msg ...string) error { - err := wrapWithField(ErrPartitionNotLoaded, "partition", partition) + err := wrapFields(ErrPartitionNotLoaded, value("partition", partition)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrPartitionNotFullyLoaded(partition any, msg ...string) error { - err := wrapWithField(ErrPartitionNotFullyLoaded, "partition", partition) + err := wrapFields(ErrPartitionNotFullyLoaded, value("partition", partition)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // ResourceGroup related func WrapErrResourceGroupNotFound(rg any, msg ...string) error { - err := wrapWithField(ErrResourceGroupNotFound, "rg", rg) + err := wrapFields(ErrResourceGroupNotFound, value("rg", rg)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Replica related func WrapErrReplicaNotFound(id int64, msg ...string) error { - err := wrapWithField(ErrReplicaNotFound, "replica", id) + err := wrapFields(ErrReplicaNotFound, value("replica", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrReplicaNotAvailable(id int64, msg ...string) error { - err := wrapWithField(ErrReplicaNotAvailable, "replica", id) + err := wrapFields(ErrReplicaNotAvailable, value("replica", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Channel related func WrapErrChannelNotFound(name string, msg ...string) error { - err := wrapWithField(ErrChannelNotFound, "channel", name) + err := wrapFields(ErrChannelNotFound, value("channel", name)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrChannelLack(name string, msg ...string) error { - err := wrapWithField(ErrChannelLack, "channel", name) + err := wrapFields(ErrChannelLack, value("channel", name)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrChannelReduplicate(name string, msg ...string) error { - err := wrapWithField(ErrChannelReduplicate, "channel", name) + err := wrapFields(ErrChannelReduplicate, value("channel", name)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrChannelNotAvailable(name string, msg ...string) error { - err := wrapWithField(ErrChannelNotAvailable, "channel", name) + err := wrapFields(ErrChannelNotAvailable, value("channel", name)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Segment related func WrapErrSegmentNotFound(id int64, msg ...string) error { - err := wrapWithField(ErrSegmentNotFound, "segment", id) + err := wrapFields(ErrSegmentNotFound, value("segment", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrSegmentsNotFound(ids []int64, msg ...string) error { - err := wrapWithField(ErrSegmentNotFound, "segments", ids) + err := wrapFields(ErrSegmentNotFound, value("segments", ids)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrSegmentNotLoaded(id int64, msg ...string) error { - err := wrapWithField(ErrSegmentNotLoaded, "segment", id) + err := wrapFields(ErrSegmentNotLoaded, value("segment", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrSegmentLack(id int64, msg ...string) error { - err := wrapWithField(ErrSegmentLack, "segment", id) + err := wrapFields(ErrSegmentLack, value("segment", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrSegmentReduplicate(id int64, msg ...string) error { - err := wrapWithField(ErrSegmentReduplicate, "segment", id) + err := wrapFields(ErrSegmentReduplicate, value("segment", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Index related func WrapErrIndexNotFound(indexName string, msg ...string) error { - err := wrapWithField(ErrIndexNotFound, "indexName", indexName) + err := wrapFields(ErrIndexNotFound, value("indexName", indexName)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrIndexNotFoundForSegment(segmentID int64, msg ...string) error { - err := wrapWithField(ErrIndexNotFound, "segmentID", segmentID) + err := wrapFields(ErrIndexNotFound, value("segmentID", segmentID)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrIndexNotFoundForCollection(collection string, msg ...string) error { - err := wrapWithField(ErrIndexNotFound, "collection", collection) + err := wrapFields(ErrIndexNotFound, value("collection", collection)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrIndexNotSupported(indexType string, msg ...string) error { - err := wrapWithField(ErrIndexNotSupported, "indexType", indexType) + err := wrapFields(ErrIndexNotSupported, value("indexType", indexType)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrIndexDuplicate(indexName string, msg ...string) error { - err := wrapWithField(ErrIndexDuplicate, "indexName", indexName) + err := wrapFields(ErrIndexDuplicate, value("indexName", indexName)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Node related func WrapErrNodeNotFound(id int64, msg ...string) error { - err := wrapWithField(ErrNodeNotFound, "node", id) + err := wrapFields(ErrNodeNotFound, value("node", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrNodeOffline(id int64, msg ...string) error { - err := wrapWithField(ErrNodeOffline, "node", id) + err := wrapFields(ErrNodeOffline, value("node", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrNodeLack(expectedNum, actualNum int64, msg ...string) error { - err := errors.Wrapf(ErrNodeLack, "expectedNum=%d, actualNum=%d", expectedNum, actualNum) + err := wrapFields(ErrNodeLack, + value("expectedNum", expectedNum), + value("actualNum", actualNum), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } @@ -626,32 +673,35 @@ func WrapErrNodeLack(expectedNum, actualNum int64, msg ...string) error { func WrapErrNodeLackAny(msg ...string) error { err := error(ErrNodeLack) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrNodeNotAvailable(id int64, msg ...string) error { - err := wrapWithField(ErrNodeNotAvailable, "node", id) + err := wrapFields(ErrNodeNotAvailable, value("node", id)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrNodeNotMatch(expectedNodeID, actualNodeID int64, msg ...string) error { - err := errors.Wrapf(ErrNodeNotMatch, "expectedNodeID=%d, actualNodeID=%d", expectedNodeID, actualNodeID) + err := wrapFields(ErrNodeNotMatch, + value("expectedNodeID", expectedNodeID), + value("actualNodeID", actualNodeID), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // IO related func WrapErrIoKeyNotFound(key string, msg ...string) error { - err := errors.Wrapf(ErrIoKeyNotFound, "key=%s", key) + err := wrapFields(ErrIoKeyNotFound, value("key", key)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } @@ -660,70 +710,73 @@ func WrapErrIoFailed(key string, err error) error { if err == nil { return nil } - err = errors.Wrapf(ErrIoFailed, "key=%s: %v", key, err) - return err + return wrapFieldsWithDesc(ErrIoFailed, err.Error(), value("key", key)) } func WrapErrIoFailedReason(reason string, msg ...string) error { - err := errors.Wrapf(ErrIoFailed, reason) + err := wrapFieldsWithDesc(ErrIoFailed, reason) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Parameter related func WrapErrParameterInvalid[T any](expected, actual T, msg ...string) error { - err := errors.Wrapf(ErrParameterInvalid, "expected=%v, actual=%v", expected, actual) + err := wrapFields(ErrParameterInvalid, + value("expected", expected), + value("actual", actual), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrParameterInvalidRange[T any](lower, upper, actual T, msg ...string) error { - err := errors.Wrapf(ErrParameterInvalid, "expected in [%v, %v], actual=%v", lower, upper, actual) + err := wrapFields(ErrParameterInvalid, + bound("value", actual, lower, upper), + ) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrParameterInvalidMsg(fmt string, args ...any) error { - err := errors.Wrapf(ErrParameterInvalid, fmt, args...) - return err + return errors.Wrapf(ErrParameterInvalid, fmt, args...) } // Metrics related func WrapErrMetricNotFound(name string, msg ...string) error { - err := errors.Wrapf(ErrMetricNotFound, "metric=%s", name) + err := wrapFields(ErrMetricNotFound, value("metric", name)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // Message queue related func WrapErrMqTopicNotFound(name string, msg ...string) error { - err := errors.Wrapf(ErrMqTopicNotFound, "topic=%s", name) + err := wrapFields(ErrMqTopicNotFound, value("topic", name)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrMqTopicNotEmpty(name string, msg ...string) error { - err := errors.Wrapf(ErrMqTopicNotEmpty, "topic=%s", name) + err := wrapFields(ErrMqTopicNotEmpty, value("topic", name)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrMqInternal(err error, msg ...string) error { - err = errors.Wrapf(ErrMqInternal, "internal=%v", err) + err = wrapFieldsWithDesc(ErrMqInternal, err.Error()) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } @@ -740,30 +793,83 @@ func WrapErrPrivilegeNotPermitted(fmt string, args ...any) error { // Segcore related func WrapErrSegcore(code int32, msg ...string) error { - err := errors.Wrapf(ErrSegcore, "internal code=%v", code) + err := wrapFields(ErrSegcore, value("segcoreCode", code)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } // field related func WrapErrFieldNotFound[T any](field T, msg ...string) error { - err := errors.Wrapf(ErrFieldNotFound, "field=%v", field) + err := wrapFields(ErrFieldNotFound, value("field", field)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } func WrapErrFieldNameInvalid(field any, msg ...string) error { - err := wrapWithField(ErrFieldInvalidName, "field", field) + err := wrapFields(ErrFieldInvalidName, value("field", field)) if len(msg) > 0 { - err = errors.Wrap(err, strings.Join(msg, "; ")) + err = errors.Wrap(err, strings.Join(msg, "->")) } return err } -func wrapWithField(err error, name string, value any) error { - return errors.Wrapf(err, "%s=%v", name, value) +func wrapFields(err milvusError, fields ...errorField) error { + for i := range fields { + err.msg += fmt.Sprintf("[%s]", fields[i].String()) + } + err.detail = err.msg + return err +} + +func wrapFieldsWithDesc(err milvusError, desc string, fields ...errorField) error { + for i := range fields { + err.msg += fmt.Sprintf("[%s]", fields[i].String()) + } + err.msg += ": " + desc + err.detail = err.msg + return err +} + +type errorField interface { + String() string +} + +type valueField struct { + name string + value any +} + +func value(name string, value any) valueField { + return valueField{ + name, + value, + } +} + +func (f valueField) String() string { + return fmt.Sprintf("%s=%v", f.name, f.value) +} + +type boundField struct { + name string + value any + lower any + upper any +} + +func bound(name string, value, lower, upper any) boundField { + return boundField{ + name, + value, + lower, + upper, + } +} + +func (f boundField) String() string { + return fmt.Sprintf("%v out of range %v <= %s <= %v", f.value, f.lower, f.name, f.upper) } diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index 816ee45699..47bbee2eac 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -1311,7 +1311,7 @@ class TestCollectionSearchInvalid(TestcaseBase): default_search_params, default_limit, expr, check_task=CheckTasks.err_res, - check_items={"err_code": 65538, + check_items={"err_code": 65535, "err_msg": "UnknownError: unsupported right datatype JSON of compare expr"})