diff --git a/.github/workflows/code-checker.yaml b/.github/workflows/code-checker.yaml index d4f4416745f51..21c5df8c94b7d 100644 --- a/.github/workflows/code-checker.yaml +++ b/.github/workflows/code-checker.yaml @@ -35,6 +35,14 @@ jobs: strategy: fail-fast: false steps: + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 10240 + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' - name: Checkout uses: actions/checkout@v2 - name: 'Generate CCache Hash' @@ -74,6 +82,14 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 180 steps: + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 10240 + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' - name: Checkout uses: actions/checkout@v2 - name: 'Generate CCache Hash' diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 590e0b1cf17db..fbec3c4235205 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -47,6 +47,14 @@ jobs: env: UBUNTU: ${{ matrix.ubuntu }} steps: + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 10240 + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' - name: Checkout uses: actions/checkout@v2 with: @@ -92,7 +100,7 @@ jobs: run: | ./build/builder.sh /bin/bash -c "make USE_ASAN=${{env.useasan}} build-cpp-with-coverage" - run: | - zip -r code.zip . -x "./.docker/*" + zip -r code.zip . -x "./.docker/*" -x "./cmake_build/thirdparty/*" - name: Archive code uses: actions/upload-artifact@v3 with: @@ -127,8 +135,6 @@ jobs: shell: bash run: | docker-compose up -d azurite -# - name: 'Setup upterm session' -# uses: lhotari/action-upterm@v1 - name: UT run: | chmod +x build/builder.sh @@ -173,8 +179,6 @@ jobs: shell: bash run: | docker-compose up -d pulsar etcd minio azurite -# - name: 'Setup upterm session' -# uses: lhotari/action-upterm@v1 - name: UT run: | chmod +x build/builder.sh diff --git a/configs/milvus.yaml b/configs/milvus.yaml index 98430939eafc6..d013fb00e0d36 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -91,7 +91,7 @@ minio: # Supported level: off, fatal, error, warn, info, debug, trace logLevel: fatal # Cloud data center region - region: "" + region: '' # Cloud whether use virtual host bucket mode useVirtualHost: false # timeout for request time in milliseconds @@ -498,7 +498,7 @@ common: BeamWidthRatio: 4 gracefulTime: 5000 # milliseconds. it represents the interval (in ms) by which the request arrival time needs to be subtracted in the case of Bounded Consistency. gracefulStopTimeout: 1800 # seconds. it will force quit the server if the graceful stop process is not completed during this time. - storageType: minio # please adjust in embedded Milvus: local + storageType: opendal # please adjust in embedded Milvus: local # Default value: auto # Valid values: [auto, avx512, avx2, avx, sse4_2] # This configuration is only used by querynode and indexnode, it selects CPU instruction set for Searching and Index-building. @@ -518,9 +518,9 @@ common: enabled: false # support pre-created topics # the name of pre-created topics - names: ["topic1", "topic2"] + names: ['topic1', 'topic2'] # need to set a separated topic to stand for currently consumed timestamp for each channel - timeticker: "timetick-channel" + timeticker: 'timetick-channel' ImportMaxFileSize: 17179869184 # 16 * 1024 * 1024 * 1024 # max file size to import for bulkInsert diff --git a/internal/core/conanfile.py b/internal/core/conanfile.py index 69c6e535f3c08..650e9135d23c6 100644 --- a/internal/core/conanfile.py +++ b/internal/core/conanfile.py @@ -6,7 +6,7 @@ class MilvusConan(ConanFile): requires = ( "rocksdb/6.29.5", "boost/1.82.0", - "onetbb/2021.7.0", + "onetbb/2021.9.0", "nlohmann_json/3.11.2", "zstd/1.5.4", "lz4/1.9.4", diff --git a/internal/core/src/common/CMakeLists.txt b/internal/core/src/common/CMakeLists.txt index 7fdac692ed909..5072728c20e62 100644 --- a/internal/core/src/common/CMakeLists.txt +++ b/internal/core/src/common/CMakeLists.txt @@ -33,6 +33,7 @@ target_link_libraries(milvus_common yaml-cpp boost_bitset_ext simdjson + opendal ${CONAN_LIBS} ) diff --git a/internal/core/src/indexbuilder/CMakeLists.txt b/internal/core/src/indexbuilder/CMakeLists.txt index cae7415c9ca0a..a6fdea64565a2 100644 --- a/internal/core/src/indexbuilder/CMakeLists.txt +++ b/internal/core/src/indexbuilder/CMakeLists.txt @@ -20,17 +20,7 @@ set(INDEXBUILDER_FILES milvus_add_pkg_config("milvus_indexbuilder") add_library(milvus_indexbuilder SHARED ${INDEXBUILDER_FILES}) -find_library(TBB NAMES tbb) -set(PLATFORM_LIBS dl) -if (MSYS) -set(PLATFORM_LIBS -Wl,--allow-multiple-definition) -endif () - # link order matters -target_link_libraries(milvus_indexbuilder - milvus_index - ${TBB} - ${PLATFORM_LIBS} - ) +target_link_libraries(milvus_indexbuilder milvus_index) install(TARGETS milvus_indexbuilder DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/internal/core/src/indexbuilder/index_c.cpp b/internal/core/src/indexbuilder/index_c.cpp index adc78b9c00792..8951742a9ef7c 100644 --- a/internal/core/src/indexbuilder/index_c.cpp +++ b/internal/core/src/indexbuilder/index_c.cpp @@ -310,6 +310,8 @@ NewBuildIndexInfo(CBuildIndexInfo* c_build_index_info, std::string(c_storage_config.cloud_provider); storage_config.iam_endpoint = std::string(c_storage_config.iam_endpoint); + storage_config.cloud_provider = + std::string(c_storage_config.cloud_provider); storage_config.useSSL = c_storage_config.useSSL; storage_config.useIAM = c_storage_config.useIAM; storage_config.region = c_storage_config.region; diff --git a/internal/core/src/pb/common.pb.cc b/internal/core/src/pb/common.pb.cc index e919ab3aa2861..e994af71fbcfd 100644 --- a/internal/core/src/pb/common.pb.cc +++ b/internal/core/src/pb/common.pb.cc @@ -121,9 +121,21 @@ 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_.replicate_)*/nullptr + /*decltype(_impl_.properties_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.replicateinfo_)*/nullptr , /*decltype(_impl_.msgid_)*/int64_t{0} , /*decltype(_impl_.timestamp_)*/uint64_t{0u} , /*decltype(_impl_.sourceid_)*/int64_t{0} @@ -139,19 +151,20 @@ struct MsgBaseDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MsgBaseDefaultTypeInternal _MsgBase_default_instance_; -PROTOBUF_CONSTEXPR ReplicateEntity::ReplicateEntity( +PROTOBUF_CONSTEXPR ReplicateInfo::ReplicateInfo( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.isreplicate_)*/false + /*decltype(_impl_.msgtimestamp_)*/uint64_t{0u} + , /*decltype(_impl_.isreplicate_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} -struct ReplicateEntityDefaultTypeInternal { - PROTOBUF_CONSTEXPR ReplicateEntityDefaultTypeInternal() +struct ReplicateInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ReplicateInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~ReplicateEntityDefaultTypeInternal() {} + ~ReplicateInfoDefaultTypeInternal() {} union { - ReplicateEntity _instance; + ReplicateInfo _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReplicateEntityDefaultTypeInternal _ReplicateEntity_default_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 @@ -270,7 +283,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[17]; +static ::_pb::Metadata file_level_metadata_common_2eproto[18]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_common_2eproto[13]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_common_2eproto = nullptr; @@ -331,6 +344,16 @@ 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_ @@ -342,14 +365,16 @@ 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_.replicate_), + 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::ReplicateEntity, _internal_metadata_), + 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::ReplicateEntity, _impl_.isreplicate_), + 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_ @@ -436,16 +461,17 @@ 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, -1, -1, sizeof(::milvus::proto::common::MsgBase)}, - { 68, -1, -1, sizeof(::milvus::proto::common::ReplicateEntity)}, - { 75, -1, -1, sizeof(::milvus::proto::common::MsgHeader)}, - { 82, -1, -1, sizeof(::milvus::proto::common::DMLMsgHeader)}, - { 90, -1, -1, sizeof(::milvus::proto::common::PrivilegeExt)}, - { 100, -1, -1, sizeof(::milvus::proto::common::SegmentStats)}, - { 108, 116, -1, sizeof(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse)}, - { 118, -1, -1, sizeof(::milvus::proto::common::ClientInfo)}, - { 130, 138, -1, sizeof(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse)}, - { 140, -1, -1, sizeof(::milvus::proto::common::ServerInfo)}, + { 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)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -456,8 +482,9 @@ 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::_ReplicateEntity_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, @@ -481,184 +508,187 @@ 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\"\270\001\n\007MsgBase\022.\n\010msg_type\030\001 \001(\0162" + "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\0227\n\treplicate\030\006 \001(\0132$" - ".milvus.proto.common.ReplicateEntity\"&\n\017" - "ReplicateEntity\022\023\n\013isReplicate\030\001 \001(\010\"7\n\t" - "MsgHeader\022*\n\004base\030\001 \001(\0132\034.milvus.proto.c" - "ommon.MsgBase\"M\n\014DMLMsgHeader\022*\n\004base\030\001 " - "\001(\0132\034.milvus.proto.common.MsgBase\022\021\n\tsha" - "rdName\030\002 \001(\t\"\273\001\n\014PrivilegeExt\0224\n\013object_" - "type\030\001 \001(\0162\037.milvus.proto.common.ObjectT" - "ype\022>\n\020object_privilege\030\002 \001(\0162$.milvus.p" - "roto.common.ObjectPrivilege\022\031\n\021object_na" - "me_index\030\003 \001(\005\022\032\n\022object_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_typ" - "e\030\001 \001(\t\022\023\n\013sdk_version\030\002 \001(\t\022\022\n\nlocal_ti" - "me\030\003 \001(\t\022\014\n\004user\030\004 \001(\t\022\014\n\004host\030\005 \001(\t\022\?\n\010" - "reserved\030\006 \003(\0132-.milvus.proto.common.Cli" - "entInfo.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\nServe" - "rInfo\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.common.ServerInfo.Re" - "servedEntry\032/\n\rReservedEntry\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\007Su" - "ccess\020\000\022\023\n\017UnexpectedError\020\001\022\021\n\rConnectF" - "ailed\020\002\022\024\n\020PermissionDenied\020\003\022\027\n\023Collect" - "ionNotExists\020\004\022\023\n\017IllegalArgument\020\005\022\024\n\020I" - "llegalDimension\020\007\022\024\n\020IllegalIndexType\020\010\022" - "\031\n\025IllegalCollectionName\020\t\022\017\n\013IllegalTOP" - "K\020\n\022\024\n\020IllegalRowRecord\020\013\022\023\n\017IllegalVect" - "orID\020\014\022\027\n\023IllegalSearchResult\020\r\022\020\n\014FileN" - "otFound\020\016\022\016\n\nMetaFailed\020\017\022\017\n\013CacheFailed" - "\020\020\022\026\n\022CannotCreateFolder\020\021\022\024\n\020CannotCrea" - "teFile\020\022\022\026\n\022CannotDeleteFolder\020\023\022\024\n\020Cann" - "otDeleteFile\020\024\022\023\n\017BuildIndexError\020\025\022\020\n\014I" - "llegalNLIST\020\026\022\025\n\021IllegalMetricType\020\027\022\017\n\013" - "OutOfMemory\020\030\022\021\n\rIndexNotExist\020\031\022\023\n\017Empt" - "yCollection\020\032\022\033\n\027UpdateImportTaskFailure" - "\020\033\022\032\n\026CollectionNameNotFound\020\034\022\033\n\027Create" - "CredentialFailure\020\035\022\033\n\027UpdateCredentialF" - "ailure\020\036\022\033\n\027DeleteCredentialFailure\020\037\022\030\n" - "\024GetCredentialFailure\020 \022\030\n\024ListCredUsers" - "Failure\020!\022\022\n\016GetUserFailure\020\"\022\025\n\021CreateR" - "oleFailure\020#\022\023\n\017DropRoleFailure\020$\022\032\n\026Ope" - "rateUserRoleFailure\020%\022\025\n\021SelectRoleFailu" - "re\020&\022\025\n\021SelectUserFailure\020\'\022\031\n\025SelectRes" - "ourceFailure\020(\022\033\n\027OperatePrivilegeFailur" - "e\020)\022\026\n\022SelectGrantFailure\020*\022!\n\035RefreshPo" - "licyInfoCacheFailure\020+\022\025\n\021ListPolicyFail" - "ure\020,\022\022\n\016NotShardLeader\020-\022\026\n\022NoReplicaAv" - "ailable\020.\022\023\n\017SegmentNotFound\020/\022\r\n\tForceD" - "eny\0200\022\r\n\tRateLimit\0201\022\022\n\016NodeIDNotMatch\0202" - "\022\024\n\020UpsertAutoIDTrue\0203\022\034\n\030InsufficientMe" - "moryToLoad\0204\022\030\n\024MemoryQuotaExhausted\0205\022\026" - "\n\022DiskQuotaExhausted\0206\022\025\n\021TimeTickLongDe" - "lay\0207\022\021\n\rNotReadyServe\0208\022\033\n\027NotReadyCoor" - "dActivating\0209\022\017\n\013DataCoordNA\020d\022\022\n\rDDRequ" - "estRace\020\350\007*c\n\nIndexState\022\022\n\016IndexStateNo" - "ne\020\000\022\014\n\010Unissued\020\001\022\016\n\nInProgress\020\002\022\014\n\010Fi" - "nished\020\003\022\n\n\006Failed\020\004\022\t\n\005Retry\020\005*\202\001\n\014Segm" - "entState\022\024\n\020SegmentStateNone\020\000\022\014\n\010NotExi" - "st\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\tImporti" - "ng\020\007*i\n\017PlaceholderType\022\010\n\004None\020\000\022\020\n\014Bin" - "aryVector\020d\022\017\n\013FloatVector\020e\022\021\n\rFloat16V" - "ector\020f\022\t\n\005Int64\020\005\022\013\n\007VarChar\020\025*\264\020\n\007MsgT" - "ype\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\017ShowCollectio" - "ns\020h\022\024\n\020GetSystemConfigs\020i\022\022\n\016LoadCollec" - "tion\020j\022\025\n\021ReleaseCollection\020k\022\017\n\013CreateA" - "lias\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\017" - "CreatePartition\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\016ShowPartitions\020\314\001\022\023\n\016LoadPartitions" - "\020\315\001\022\026\n\021ReleasePartitions\020\316\001\022\021\n\014ShowSegme" - "nts\020\372\001\022\024\n\017DescribeSegment\020\373\001\022\021\n\014LoadSegm" - "ents\020\374\001\022\024\n\017ReleaseSegments\020\375\001\022\024\n\017Handoff" - "Segments\020\376\001\022\030\n\023LoadBalanceSegments\020\377\001\022\025\n" - "\020DescribeSegments\020\200\002\022\034\n\027FederListIndexed" - "Segment\020\201\002\022\"\n\035FederDescribeSegmentIndexD" - "ata\020\202\002\022\020\n\013CreateIndex\020\254\002\022\022\n\rDescribeInde" - "x\020\255\002\022\016\n\tDropIndex\020\256\002\022\027\n\022GetIndexStatisti" - "cs\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\022ResendSegmentStats\020\223\003\022\013\n\006Upsert\020\224" - "\003\022\013\n\006Search\020\364\003\022\021\n\014SearchResult\020\365\003\022\022\n\rGet" - "IndexState\020\366\003\022\032\n\025GetIndexBuildProgress\020\367" - "\003\022\034\n\027GetCollectionStatistics\020\370\003\022\033\n\026GetPa" - "rtitionStatistics\020\371\003\022\r\n\010Retrieve\020\372\003\022\023\n\016R" - "etrieveResult\020\373\003\022\024\n\017WatchDmChannels\020\374\003\022\025" - "\n\020RemoveDmChannels\020\375\003\022\027\n\022WatchQueryChann" - "els\020\376\003\022\030\n\023RemoveQueryChannels\020\377\003\022\035\n\030Seal" - "edSegmentsChangeInfo\020\200\004\022\027\n\022WatchDeltaCha" - "nnels\020\201\004\022\024\n\017GetShardLeaders\020\202\004\022\020\n\013GetRep" - "licas\020\203\004\022\023\n\016UnsubDmChannel\020\204\004\022\024\n\017GetDist" - "ribution\020\205\004\022\025\n\020SyncDistribution\020\206\004\022\020\n\013Se" - "gmentInfo\020\330\004\022\017\n\nSystemInfo\020\331\004\022\024\n\017GetReco" - "veryInfo\020\332\004\022\024\n\017GetSegmentState\020\333\004\022\r\n\010Tim" - "eTick\020\260\t\022\023\n\016QueryNodeStats\020\261\t\022\016\n\tLoadInd" - "ex\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\021SegmentStatistic" - "s\020\266\t\022\025\n\020SegmentFlushDone\020\267\t\022\017\n\nDataNodeT" - "t\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\020CreateCredentia" - "l\020\334\013\022\022\n\rGetCredential\020\335\013\022\025\n\020DeleteCreden" - "tial\020\336\013\022\025\n\020UpdateCredential\020\337\013\022\026\n\021ListCr" - "edUsernames\020\340\013\022\017\n\nCreateRole\020\300\014\022\r\n\010DropR" - "ole\020\301\014\022\024\n\017OperateUserRole\020\302\014\022\017\n\nSelectRo" - "le\020\303\014\022\017\n\nSelectUser\020\304\014\022\023\n\016SelectResource" - "\020\305\014\022\025\n\020OperatePrivilege\020\306\014\022\020\n\013SelectGran" - "t\020\307\014\022\033\n\026RefreshPolicyInfoCache\020\310\014\022\017\n\nLis" - "tPolicy\020\311\014\022\030\n\023CreateResourceGroup\020\244\r\022\026\n\021" - "DropResourceGroup\020\245\r\022\027\n\022ListResourceGrou" - "ps\020\246\r\022\032\n\025DescribeResourceGroup\020\247\r\022\021\n\014Tra" - "nsferNode\020\250\r\022\024\n\017TransferReplica\020\251\r\022\023\n\016Cr" - "eateDatabase\020\211\016\022\021\n\014DropDatabase\020\212\016\022\022\n\rLi" - "stDatabases\020\213\016*\"\n\007DslType\022\007\n\003Dsl\020\000\022\016\n\nBo" - "olExprV1\020\001*B\n\017CompactionState\022\021\n\rUndefie" - "dState\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\007Sessio" - "n\020\001\022\013\n\007Bounded\020\002\022\016\n\nEventually\020\003\022\016\n\nCust" - "omized\020\004*\236\001\n\013ImportState\022\021\n\rImportPendin" - "g\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\026ImportFailedAnd" - "Cleaned\020\007*2\n\nObjectType\022\016\n\nCollection\020\000\022" - "\n\n\006Global\020\001\022\010\n\004User\020\002*\241\010\n\017ObjectPrivileg" - "e\022\020\n\014PrivilegeAll\020\000\022\035\n\031PrivilegeCreateCo" - "llection\020\001\022\033\n\027PrivilegeDropCollection\020\002\022" - "\037\n\033PrivilegeDescribeCollection\020\003\022\034\n\030Priv" - "ilegeShowCollections\020\004\022\021\n\rPrivilegeLoad\020" - "\005\022\024\n\020PrivilegeRelease\020\006\022\027\n\023PrivilegeComp" - "action\020\007\022\023\n\017PrivilegeInsert\020\010\022\023\n\017Privile" - "geDelete\020\t\022\032\n\026PrivilegeGetStatistics\020\n\022\030" - "\n\024PrivilegeCreateIndex\020\013\022\030\n\024PrivilegeInd" - "exDetail\020\014\022\026\n\022PrivilegeDropIndex\020\r\022\023\n\017Pr" - "ivilegeSearch\020\016\022\022\n\016PrivilegeFlush\020\017\022\022\n\016P" - "rivilegeQuery\020\020\022\030\n\024PrivilegeLoadBalance\020" - "\021\022\023\n\017PrivilegeImport\020\022\022\034\n\030PrivilegeCreat" - "eOwnership\020\023\022\027\n\023PrivilegeUpdateUser\020\024\022\032\n" - "\026PrivilegeDropOwnership\020\025\022\034\n\030PrivilegeSe" - "lectOwnership\020\026\022\034\n\030PrivilegeManageOwners" - "hip\020\027\022\027\n\023PrivilegeSelectUser\020\030\022\023\n\017Privil" - "egeUpsert\020\031\022 \n\034PrivilegeCreateResourceGr" - "oup\020\032\022\036\n\032PrivilegeDropResourceGroup\020\033\022\"\n" - "\036PrivilegeDescribeResourceGroup\020\034\022\037\n\033Pri" - "vilegeListResourceGroups\020\035\022\031\n\025PrivilegeT" - "ransferNode\020\036\022\034\n\030PrivilegeTransferReplic" - "a\020\037\022\037\n\033PrivilegeGetLoadingProgress\020 \022\031\n\025" - "PrivilegeGetLoadState\020!\022\035\n\031PrivilegeRena" - "meCollection\020\"\022\033\n\027PrivilegeCreateDatabas" - "e\020#\022\031\n\025PrivilegeDropDatabase\020$\022\032\n\026Privil" - "egeListDatabases\020%\022\025\n\021PrivilegeFlushAll\020" - "&*S\n\tStateCode\022\020\n\014Initializing\020\000\022\013\n\007Heal" - "thy\020\001\022\014\n\010Abnormal\020\002\022\013\n\007StandBy\020\003\022\014\n\010Stop" - "ping\020\004*c\n\tLoadState\022\025\n\021LoadStateNotExist" - "\020\000\022\024\n\020LoadStateNotLoad\020\001\022\024\n\020LoadStateLoa" - "ding\020\002\022\023\n\017LoadStateLoaded\020\003:^\n\021privilege" - "_ext_obj\022\037.google.protobuf.MessageOption" - "s\030\351\007 \001(\0132!.milvus.proto.common.Privilege" - "ExtBm\n\016io.milvus.grpcB\013CommonProtoP\001Z4gi" - "thub.com/milvus-io/milvus-proto/go-api/v" - "2/commonpb\240\001\001\252\002\022Milvus.Client.Grpcb\006prot" - "o3" + "\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" ; 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, 7202, descriptor_table_protodef_common_2eproto, + false, false, 7341, descriptor_table_protodef_common_2eproto, "common.proto", - &descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_deps, 1, 17, + &descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_deps, 1, 18, 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, @@ -2725,26 +2755,44 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Address::GetMetadata() const { // =================================================================== +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::ReplicateEntity& replicate(const MsgBase* msg); + static const ::milvus::proto::common::ReplicateInfo& replicateinfo(const MsgBase* msg); }; -const ::milvus::proto::common::ReplicateEntity& -MsgBase::_Internal::replicate(const MsgBase* msg) { - return *msg->_impl_.replicate_; +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_.replicate_){nullptr} + /*decltype(_impl_.properties_)*/{} + , decltype(_impl_.replicateinfo_){nullptr} , decltype(_impl_.msgid_){} , decltype(_impl_.timestamp_){} , decltype(_impl_.sourceid_){} @@ -2753,8 +2801,9 @@ MsgBase::MsgBase(const MsgBase& from) , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_replicate()) { - _this->_impl_.replicate_ = new ::milvus::proto::common::ReplicateEntity(*from._impl_.replicate_); + _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_) - @@ -2767,7 +2816,8 @@ inline void MsgBase::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.replicate_){nullptr} + /*decltype(_impl_.properties_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.replicateinfo_){nullptr} , decltype(_impl_.msgid_){int64_t{0}} , decltype(_impl_.timestamp_){uint64_t{0u}} , decltype(_impl_.sourceid_){int64_t{0}} @@ -2781,6 +2831,7 @@ 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(); @@ -2788,9 +2839,15 @@ MsgBase::~MsgBase() { inline void MsgBase::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.replicate_; + _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); } @@ -2801,10 +2858,11 @@ void MsgBase::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - if (GetArenaForAllocation() == nullptr && _impl_.replicate_ != nullptr) { - delete _impl_.replicate_; + _impl_.properties_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.replicateinfo_ != nullptr) { + delete _impl_.replicateinfo_; } - _impl_.replicate_ = nullptr; + _impl_.replicateinfo_ = nullptr; ::memset(&_impl_.msgid_, 0, static_cast( reinterpret_cast(&_impl_.msg_type_) - reinterpret_cast(&_impl_.msgid_)) + sizeof(_impl_.msg_type_)); @@ -2858,10 +2916,23 @@ const char* MsgBase::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; - // .milvus.proto.common.ReplicateEntity replicate = 6; + // map properties = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr = ctx->ParseMessage(_internal_mutable_replicate(), ptr); + 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; @@ -2926,11 +2997,41 @@ uint8_t* MsgBase::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_targetid(), target); } - // .milvus.proto.common.ReplicateEntity replicate = 6; - if (this->_internal_has_replicate()) { + // 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(6, _Internal::replicate(this), - _Internal::replicate(this).GetCachedSize(), target, stream); + InternalWriteMessage(7, _Internal::replicateinfo(this), + _Internal::replicateinfo(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2949,11 +3050,20 @@ size_t MsgBase::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // .milvus.proto.common.ReplicateEntity replicate = 6; - if (this->_internal_has_replicate()) { + // 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_.replicate_); + *_impl_.replicateinfo_); } // int64 msgID = 2; @@ -3000,9 +3110,10 @@ void MsgBase::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOB uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_has_replicate()) { - _this->_internal_mutable_replicate()->::milvus::proto::common::ReplicateEntity::MergeFrom( - from._internal_replicate()); + _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()); @@ -3036,56 +3147,61 @@ 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_.replicate_)>( - reinterpret_cast(&_impl_.replicate_), - reinterpret_cast(&other->_impl_.replicate_)); + - PROTOBUF_FIELD_OFFSET(MsgBase, _impl_.replicateinfo_)>( + reinterpret_cast(&_impl_.replicateinfo_), + reinterpret_cast(&other->_impl_.replicateinfo_)); } ::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[7]); + file_level_metadata_common_2eproto[8]); } // =================================================================== -class ReplicateEntity::_Internal { +class ReplicateInfo::_Internal { public: }; -ReplicateEntity::ReplicateEntity(::PROTOBUF_NAMESPACE_ID::Arena* arena, +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.ReplicateEntity) + // @@protoc_insertion_point(arena_constructor:milvus.proto.common.ReplicateInfo) } -ReplicateEntity::ReplicateEntity(const ReplicateEntity& from) +ReplicateInfo::ReplicateInfo(const ReplicateInfo& from) : ::PROTOBUF_NAMESPACE_ID::Message() { - ReplicateEntity* const _this = this; (void)_this; + ReplicateInfo* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.isreplicate_){} + decltype(_impl_.msgtimestamp_){} + , decltype(_impl_.isreplicate_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.isreplicate_ = from._impl_.isreplicate_; - // @@protoc_insertion_point(copy_constructor:milvus.proto.common.ReplicateEntity) + ::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 ReplicateEntity::SharedCtor( +inline void ReplicateInfo::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.isreplicate_){false} + decltype(_impl_.msgtimestamp_){uint64_t{0u}} + , decltype(_impl_.isreplicate_){false} , /*decltype(_impl_._cached_size_)*/{} }; } -ReplicateEntity::~ReplicateEntity() { - // @@protoc_insertion_point(destructor:milvus.proto.common.ReplicateEntity) +ReplicateInfo::~ReplicateInfo() { + // @@protoc_insertion_point(destructor:milvus.proto.common.ReplicateInfo) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; @@ -3093,25 +3209,27 @@ ReplicateEntity::~ReplicateEntity() { SharedDtor(); } -inline void ReplicateEntity::SharedDtor() { +inline void ReplicateInfo::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); } -void ReplicateEntity::SetCachedSize(int size) const { +void ReplicateInfo::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void ReplicateEntity::Clear() { -// @@protoc_insertion_point(message_clear_start:milvus.proto.common.ReplicateEntity) +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; - _impl_.isreplicate_ = false; + ::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* ReplicateEntity::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +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; @@ -3125,6 +3243,14 @@ const char* ReplicateEntity::_InternalParse(const char* ptr, ::_pbi::ParseContex } 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 @@ -3148,9 +3274,9 @@ const char* ReplicateEntity::_InternalParse(const char* ptr, ::_pbi::ParseContex #undef CHK_ } -uint8_t* ReplicateEntity::_InternalSerialize( +uint8_t* ReplicateInfo::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.common.ReplicateEntity) + // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.common.ReplicateInfo) uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -3160,22 +3286,33 @@ uint8_t* ReplicateEntity::_InternalSerialize( 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.ReplicateEntity) + // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.common.ReplicateInfo) return target; } -size_t ReplicateEntity::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:milvus.proto.common.ReplicateEntity) +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; @@ -3184,48 +3321,56 @@ size_t ReplicateEntity::ByteSizeLong() const { return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReplicateEntity::_class_data_ = { +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReplicateInfo::_class_data_ = { ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ReplicateEntity::MergeImpl + ReplicateInfo::MergeImpl }; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReplicateEntity::GetClassData() const { return &_class_data_; } +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReplicateInfo::GetClassData() const { return &_class_data_; } -void ReplicateEntity::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.ReplicateEntity) +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 ReplicateEntity::CopyFrom(const ReplicateEntity& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.common.ReplicateEntity) +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 ReplicateEntity::IsInitialized() const { +bool ReplicateInfo::IsInitialized() const { return true; } -void ReplicateEntity::InternalSwap(ReplicateEntity* other) { +void ReplicateInfo::InternalSwap(ReplicateInfo* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.isreplicate_, other->_impl_.isreplicate_); + ::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 ReplicateEntity::GetMetadata() const { +::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[8]); + file_level_metadata_common_2eproto[9]); } // =================================================================== @@ -3418,7 +3563,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[9]); + file_level_metadata_common_2eproto[10]); } // =================================================================== @@ -3663,7 +3808,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[10]); + file_level_metadata_common_2eproto[11]); } // =================================================================== @@ -3928,7 +4073,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[11]); + file_level_metadata_common_2eproto[12]); } // =================================================================== @@ -4139,7 +4284,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[12]); + file_level_metadata_common_2eproto[13]); } // =================================================================== @@ -4153,7 +4298,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[13]); + file_level_metadata_common_2eproto[14]); } // =================================================================== @@ -4624,7 +4769,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[14]); + file_level_metadata_common_2eproto[15]); } // =================================================================== @@ -4638,7 +4783,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[15]); + file_level_metadata_common_2eproto[16]); } // =================================================================== @@ -5109,7 +5254,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[16]); + file_level_metadata_common_2eproto[17]); } PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::MessageOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::milvus::proto::common::PrivilegeExt >, 11, false> @@ -5148,13 +5293,17 @@ 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::ReplicateEntity* -Arena::CreateMaybeMessage< ::milvus::proto::common::ReplicateEntity >(Arena* arena) { - return Arena::CreateMessageInternal< ::milvus::proto::common::ReplicateEntity >(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) { diff --git a/internal/core/src/pb/common.pb.h b/internal/core/src/pb/common.pb.h index 3b7dcc2bbc5bd..690bcf51a8afd 100644 --- a/internal/core/src/pb/common.pb.h +++ b/internal/core/src/pb/common.pb.h @@ -76,6 +76,9 @@ 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_; @@ -88,9 +91,9 @@ extern PlaceholderValueDefaultTypeInternal _PlaceholderValue_default_instance_; class PrivilegeExt; struct PrivilegeExtDefaultTypeInternal; extern PrivilegeExtDefaultTypeInternal _PrivilegeExt_default_instance_; -class ReplicateEntity; -struct ReplicateEntityDefaultTypeInternal; -extern ReplicateEntityDefaultTypeInternal _ReplicateEntity_default_instance_; +class ReplicateInfo; +struct ReplicateInfoDefaultTypeInternal; +extern ReplicateInfoDefaultTypeInternal _ReplicateInfo_default_instance_; class SegmentStats; struct SegmentStatsDefaultTypeInternal; extern SegmentStatsDefaultTypeInternal _SegmentStats_default_instance_; @@ -115,11 +118,12 @@ 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::ReplicateEntity* Arena::CreateMaybeMessage<::milvus::proto::common::ReplicateEntity>(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*); @@ -1854,6 +1858,34 @@ 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: @@ -1902,7 +1934,7 @@ class MsgBase final : &_MsgBase_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 8; friend void swap(MsgBase& a, MsgBase& b) { a.Swap(&b); @@ -1963,6 +1995,8 @@ 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_; @@ -1972,33 +2006,52 @@ class MsgBase final : // nested types ---------------------------------------------------- + // accessors ------------------------------------------------------- enum : int { - kReplicateFieldNumber = 6, + kPropertiesFieldNumber = 6, + kReplicateInfoFieldNumber = 7, kMsgIDFieldNumber = 2, kTimestampFieldNumber = 3, kSourceIDFieldNumber = 4, kTargetIDFieldNumber = 5, kMsgTypeFieldNumber = 1, }; - // .milvus.proto.common.ReplicateEntity replicate = 6; - bool has_replicate() const; + // map properties = 6; + int properties_size() const; private: - bool _internal_has_replicate() const; + int _internal_properties_size() const; public: - void clear_replicate(); - const ::milvus::proto::common::ReplicateEntity& replicate() const; - PROTOBUF_NODISCARD ::milvus::proto::common::ReplicateEntity* release_replicate(); - ::milvus::proto::common::ReplicateEntity* mutable_replicate(); - void set_allocated_replicate(::milvus::proto::common::ReplicateEntity* replicate); + void clear_properties(); private: - const ::milvus::proto::common::ReplicateEntity& _internal_replicate() const; - ::milvus::proto::common::ReplicateEntity* _internal_mutable_replicate(); + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + _internal_properties() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + _internal_mutable_properties(); public: - void unsafe_arena_set_allocated_replicate( - ::milvus::proto::common::ReplicateEntity* replicate); - ::milvus::proto::common::ReplicateEntity* unsafe_arena_release_replicate(); + 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(); @@ -2053,7 +2106,12 @@ class MsgBase final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::milvus::proto::common::ReplicateEntity* replicate_; + ::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_; @@ -2066,24 +2124,24 @@ class MsgBase final : }; // ------------------------------------------------------------------- -class ReplicateEntity final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.ReplicateEntity) */ { +class ReplicateInfo final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.ReplicateInfo) */ { public: - inline ReplicateEntity() : ReplicateEntity(nullptr) {} - ~ReplicateEntity() override; - explicit PROTOBUF_CONSTEXPR ReplicateEntity(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline ReplicateInfo() : ReplicateInfo(nullptr) {} + ~ReplicateInfo() override; + explicit PROTOBUF_CONSTEXPR ReplicateInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - ReplicateEntity(const ReplicateEntity& from); - ReplicateEntity(ReplicateEntity&& from) noexcept - : ReplicateEntity() { + ReplicateInfo(const ReplicateInfo& from); + ReplicateInfo(ReplicateInfo&& from) noexcept + : ReplicateInfo() { *this = ::std::move(from); } - inline ReplicateEntity& operator=(const ReplicateEntity& from) { + inline ReplicateInfo& operator=(const ReplicateInfo& from) { CopyFrom(from); return *this; } - inline ReplicateEntity& operator=(ReplicateEntity&& from) noexcept { + inline ReplicateInfo& operator=(ReplicateInfo&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -2106,20 +2164,20 @@ class ReplicateEntity final : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ReplicateEntity& default_instance() { + static const ReplicateInfo& default_instance() { return *internal_default_instance(); } - static inline const ReplicateEntity* internal_default_instance() { - return reinterpret_cast( - &_ReplicateEntity_default_instance_); + static inline const ReplicateInfo* internal_default_instance() { + return reinterpret_cast( + &_ReplicateInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 9; - friend void swap(ReplicateEntity& a, ReplicateEntity& b) { + friend void swap(ReplicateInfo& a, ReplicateInfo& b) { a.Swap(&b); } - inline void Swap(ReplicateEntity* other) { + inline void Swap(ReplicateInfo* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -2132,7 +2190,7 @@ class ReplicateEntity final : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ReplicateEntity* other) { + void UnsafeArenaSwap(ReplicateInfo* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -2140,14 +2198,14 @@ class ReplicateEntity final : // implements Message ---------------------------------------------- - ReplicateEntity* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ReplicateInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ReplicateEntity& from); + void CopyFrom(const ReplicateInfo& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ReplicateEntity& from) { - ReplicateEntity::MergeImpl(*this, from); + 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); @@ -2165,15 +2223,15 @@ class ReplicateEntity final : void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ReplicateEntity* other); + void InternalSwap(ReplicateInfo* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "milvus.proto.common.ReplicateEntity"; + return "milvus.proto.common.ReplicateInfo"; } protected: - explicit ReplicateEntity(::PROTOBUF_NAMESPACE_ID::Arena* arena, + explicit ReplicateInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: @@ -2187,8 +2245,18 @@ class ReplicateEntity final : // 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; @@ -2198,7 +2266,7 @@ class ReplicateEntity final : void _internal_set_isreplicate(bool value); public: - // @@protoc_insertion_point(class_scope:milvus.proto.common.ReplicateEntity) + // @@protoc_insertion_point(class_scope:milvus.proto.common.ReplicateInfo) private: class _Internal; @@ -2206,6 +2274,7 @@ class ReplicateEntity final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + uint64_t msgtimestamp_; bool isreplicate_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; @@ -2262,7 +2331,7 @@ class MsgHeader final : &_MsgHeader_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 10; friend void swap(MsgHeader& a, MsgHeader& b) { a.Swap(&b); @@ -2419,7 +2488,7 @@ class DMLMsgHeader final : &_DMLMsgHeader_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 11; friend void swap(DMLMsgHeader& a, DMLMsgHeader& b) { a.Swap(&b); @@ -2592,7 +2661,7 @@ class PrivilegeExt final : &_PrivilegeExt_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 12; friend void swap(PrivilegeExt& a, PrivilegeExt& b) { a.Swap(&b); @@ -2773,7 +2842,7 @@ class SegmentStats final : &_SegmentStats_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 13; friend void swap(SegmentStats& a, SegmentStats& b) { a.Swap(&b); @@ -2960,7 +3029,7 @@ class ClientInfo final : &_ClientInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 14; + 15; friend void swap(ClientInfo& a, ClientInfo& b) { a.Swap(&b); @@ -3231,7 +3300,7 @@ class ServerInfo final : &_ServerInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 16; + 17; friend void swap(ServerInfo& a, ServerInfo& b) { a.Swap(&b); @@ -4060,6 +4129,8 @@ inline void Address::set_port(int64_t value) { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // MsgBase // .milvus.proto.common.MsgType msg_type = 1; @@ -4162,45 +4233,74 @@ inline void MsgBase::set_targetid(int64_t value) { // @@protoc_insertion_point(field_set:milvus.proto.common.MsgBase.targetID) } -// .milvus.proto.common.ReplicateEntity replicate = 6; -inline bool MsgBase::_internal_has_replicate() const { - return this != internal_default_instance() && _impl_.replicate_ != nullptr; +// map properties = 6; +inline int MsgBase::_internal_properties_size() const { + return _impl_.properties_.size(); } -inline bool MsgBase::has_replicate() const { - return _internal_has_replicate(); +inline int MsgBase::properties_size() const { + return _internal_properties_size(); } -inline void MsgBase::clear_replicate() { - if (GetArenaForAllocation() == nullptr && _impl_.replicate_ != nullptr) { - delete _impl_.replicate_; +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_.replicate_ = nullptr; + _impl_.replicateinfo_ = nullptr; } -inline const ::milvus::proto::common::ReplicateEntity& MsgBase::_internal_replicate() const { - const ::milvus::proto::common::ReplicateEntity* p = _impl_.replicate_; - return p != nullptr ? *p : reinterpret_cast( - ::milvus::proto::common::_ReplicateEntity_default_instance_); +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::ReplicateEntity& MsgBase::replicate() const { - // @@protoc_insertion_point(field_get:milvus.proto.common.MsgBase.replicate) - return _internal_replicate(); +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_replicate( - ::milvus::proto::common::ReplicateEntity* replicate) { +inline void MsgBase::unsafe_arena_set_allocated_replicateinfo( + ::milvus::proto::common::ReplicateInfo* replicateinfo) { if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.replicate_); + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.replicateinfo_); } - _impl_.replicate_ = replicate; - if (replicate) { + _impl_.replicateinfo_ = replicateinfo; + if (replicateinfo) { } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:milvus.proto.common.MsgBase.replicate) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:milvus.proto.common.MsgBase.replicateInfo) } -inline ::milvus::proto::common::ReplicateEntity* MsgBase::release_replicate() { +inline ::milvus::proto::common::ReplicateInfo* MsgBase::release_replicateinfo() { - ::milvus::proto::common::ReplicateEntity* temp = _impl_.replicate_; - _impl_.replicate_ = nullptr; + ::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); @@ -4212,68 +4312,88 @@ inline ::milvus::proto::common::ReplicateEntity* MsgBase::release_replicate() { #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline ::milvus::proto::common::ReplicateEntity* MsgBase::unsafe_arena_release_replicate() { - // @@protoc_insertion_point(field_release:milvus.proto.common.MsgBase.replicate) +inline ::milvus::proto::common::ReplicateInfo* MsgBase::unsafe_arena_release_replicateinfo() { + // @@protoc_insertion_point(field_release:milvus.proto.common.MsgBase.replicateInfo) - ::milvus::proto::common::ReplicateEntity* temp = _impl_.replicate_; - _impl_.replicate_ = nullptr; + ::milvus::proto::common::ReplicateInfo* temp = _impl_.replicateinfo_; + _impl_.replicateinfo_ = nullptr; return temp; } -inline ::milvus::proto::common::ReplicateEntity* MsgBase::_internal_mutable_replicate() { +inline ::milvus::proto::common::ReplicateInfo* MsgBase::_internal_mutable_replicateinfo() { - if (_impl_.replicate_ == nullptr) { - auto* p = CreateMaybeMessage<::milvus::proto::common::ReplicateEntity>(GetArenaForAllocation()); - _impl_.replicate_ = p; + if (_impl_.replicateinfo_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::proto::common::ReplicateInfo>(GetArenaForAllocation()); + _impl_.replicateinfo_ = p; } - return _impl_.replicate_; + return _impl_.replicateinfo_; } -inline ::milvus::proto::common::ReplicateEntity* MsgBase::mutable_replicate() { - ::milvus::proto::common::ReplicateEntity* _msg = _internal_mutable_replicate(); - // @@protoc_insertion_point(field_mutable:milvus.proto.common.MsgBase.replicate) +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_replicate(::milvus::proto::common::ReplicateEntity* replicate) { +inline void MsgBase::set_allocated_replicateinfo(::milvus::proto::common::ReplicateInfo* replicateinfo) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete _impl_.replicate_; + delete _impl_.replicateinfo_; } - if (replicate) { + if (replicateinfo) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(replicate); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(replicateinfo); if (message_arena != submessage_arena) { - replicate = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, replicate, submessage_arena); + replicateinfo = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, replicateinfo, submessage_arena); } } else { } - _impl_.replicate_ = replicate; - // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.MsgBase.replicate) + _impl_.replicateinfo_ = replicateinfo; + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.MsgBase.replicateInfo) } // ------------------------------------------------------------------- -// ReplicateEntity +// ReplicateInfo // bool isReplicate = 1; -inline void ReplicateEntity::clear_isreplicate() { +inline void ReplicateInfo::clear_isreplicate() { _impl_.isreplicate_ = false; } -inline bool ReplicateEntity::_internal_isreplicate() const { +inline bool ReplicateInfo::_internal_isreplicate() const { return _impl_.isreplicate_; } -inline bool ReplicateEntity::isreplicate() const { - // @@protoc_insertion_point(field_get:milvus.proto.common.ReplicateEntity.isReplicate) +inline bool ReplicateInfo::isreplicate() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ReplicateInfo.isReplicate) return _internal_isreplicate(); } -inline void ReplicateEntity::_internal_set_isreplicate(bool value) { +inline void ReplicateInfo::_internal_set_isreplicate(bool value) { _impl_.isreplicate_ = value; } -inline void ReplicateEntity::set_isreplicate(bool value) { +inline void ReplicateInfo::set_isreplicate(bool value) { _internal_set_isreplicate(value); - // @@protoc_insertion_point(field_set:milvus.proto.common.ReplicateEntity.isReplicate) + // @@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) } // ------------------------------------------------------------------- @@ -5247,6 +5367,8 @@ ServerInfo::mutable_reserved() { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/internal/core/src/segcore/CMakeLists.txt b/internal/core/src/segcore/CMakeLists.txt index af04c11d6c75d..449ae24729ee9 100644 --- a/internal/core/src/segcore/CMakeLists.txt +++ b/internal/core/src/segcore/CMakeLists.txt @@ -41,18 +41,6 @@ set(SEGCORE_FILES ConcurrentVector.cpp) add_library(milvus_segcore SHARED ${SEGCORE_FILES}) -find_library(TBB NAMES tbb) -set(PLATFORM_LIBS dl) - -if (MSYS) - set(PLATFORM_LIBS ) -endif() - -target_link_libraries(milvus_segcore - milvus_query - ${PLATFORM_LIBS} - ${TBB} - ${OpenMP_CXX_FLAGS} - ) +target_link_libraries(milvus_segcore milvus_query ${OpenMP_CXX_FLAGS}) install(TARGETS milvus_segcore DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/internal/core/src/storage/CMakeLists.txt b/internal/core/src/storage/CMakeLists.txt index 2e698161b9662..cc3539c75c628 100644 --- a/internal/core/src/storage/CMakeLists.txt +++ b/internal/core/src/storage/CMakeLists.txt @@ -47,8 +47,9 @@ set(STORAGE_FILES Event.cpp ThreadPool.cpp storage_c.cpp + ChunkManager.cpp MinioChunkManager.cpp - ChunkManagers.cpp + OpenDALChunkManager.cpp AliyunSTSClient.cpp AliyunCredentialsProvider.cpp MemFileManagerImpl.cpp diff --git a/internal/core/src/storage/ChunkManagers.cpp b/internal/core/src/storage/ChunkManager.cpp similarity index 100% rename from internal/core/src/storage/ChunkManagers.cpp rename to internal/core/src/storage/ChunkManager.cpp diff --git a/internal/core/src/storage/ChunkManager.h b/internal/core/src/storage/ChunkManager.h index bec5addd2a547..6b0cfb80915ec 100644 --- a/internal/core/src/storage/ChunkManager.h +++ b/internal/core/src/storage/ChunkManager.h @@ -129,6 +129,7 @@ enum class ChunkManagerType : int8_t { Local = 1, Minio = 2, Remote = 3, + OpenDAL = 4, }; extern std::map ChunkManagerType_Map; diff --git a/internal/core/src/storage/OpenDALChunkManager.cpp b/internal/core/src/storage/OpenDALChunkManager.cpp new file mode 100644 index 0000000000000..9945de79846c4 --- /dev/null +++ b/internal/core/src/storage/OpenDALChunkManager.cpp @@ -0,0 +1,206 @@ +// Licensed to the LF AI & Data foundation under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include + +#include "log/Log.h" +#include "opendal.h" +#include "common/EasyAssert.h" +#include "storage/Util.h" +#include "storage/OpenDALChunkManager.h" + +namespace milvus::storage { + +std::string +ToString(opendal_bytes* bs) { + return {reinterpret_cast(bs->data), bs->len}; +} + +#define THROWOPENDALERROR(err, msg) \ + do { \ + auto exception = SegcoreError( \ + S3Error, fmt::format("{}: {}", (msg), ToString(&(err)->message))); \ + opendal_error_free(err); \ + throw exception; \ + } while (0) + +// std::once_flag init_flag_; + +OpenDALChunkManager::OpenDALChunkManager(const StorageConfig& storage_config) + : default_bucket_name_(storage_config.bucket_name) { + // std::call_once(init_flag_, []() { opendal_init_logger(); }); + remote_root_path_ = storage_config.root_path; + std::string storageType; + if (storage_config.cloud_provider == "gcp") { + storageType = "gcs"; + } else if (storage_config.cloud_provider == "aliyun") { + storageType = "oss"; + } else if (storage_config.cloud_provider == "azure") { + storageType = "azblob"; + } else { + storageType = "s3"; + } + + opendal_operator_options* op_options_ = opendal_operator_options_new(); + if (!storage_config.access_key_id.empty() && + !storage_config.access_key_value.empty()) { + opendal_operator_options_set( + op_options_, "access_key_id", storage_config.access_key_id.c_str()); + opendal_operator_options_set(op_options_, + "secret_access_key", + storage_config.access_key_value.c_str()); + storageType = "s3"; + } + opendal_operator_options_set(op_options_, "root", "/"); + opendal_operator_options_set( + op_options_, "bucket", storage_config.bucket_name.c_str()); + opendal_operator_options_set(op_options_, + "region", + storage_config.region.empty() + ? "us-east-1" + : storage_config.region.c_str()); + opendal_operator_options_set( + op_options_, + "endpoint", + ((storage_config.useSSL ? "https://" : "http://") + + storage_config.address) + .c_str()); + opendal_operator_options_set( + op_options_, + "enable_virtual_host_style", + storage_config.useVirtualHost ? "true" : "false"); + + auto op = opendal_operator_new(storageType.c_str(), op_options_); + if (op.error != nullptr) { + THROWOPENDALERROR(op.error, "Init opendal error"); + } + op_ptr_ = op.op; + opendal_operator_options_free(op_options_); + LOG_SEGCORE_INFO_ << "init OpenDALChunkManager with parameter[storage: '" + << storageType << ", " << storage_config.cloud_provider + << "', endpoint: '" << storage_config.address + << "', default_bucket_name:'" + << storage_config.bucket_name << "', use_secure:'" + << std::boolalpha << storage_config.useSSL << "']"; +} + +OpenDALChunkManager::~OpenDALChunkManager() { + opendal_operator_free(op_ptr_); +} + +uint64_t +OpenDALChunkManager::Size(const std::string& filepath) { + auto ret = opendal_operator_stat(op_ptr_, filepath.c_str()); + if (ret.error != nullptr) { + THROWOPENDALERROR(ret.error, "GetObjectSize"); + } + auto size = opendal_metadata_content_length(ret.meta); + opendal_metadata_free(ret.meta); + return size; +} + +bool +OpenDALChunkManager::Exist(const std::string& filepath) { + auto ret = opendal_operator_is_exist(op_ptr_, filepath.c_str()); + if (ret.error != nullptr) { + THROWOPENDALERROR(ret.error, "ObjectExists"); + } + return ret.is_exist; +} + +void +OpenDALChunkManager::Remove(const std::string& filepath) { + auto ret = opendal_operator_delete(op_ptr_, filepath.c_str()); + if (ret != nullptr) { + THROWOPENDALERROR(ret, "RemoveObject"); + } +} + +std::vector +OpenDALChunkManager::ListWithPrefix(const std::string& filepath) { + auto ret = opendal_operator_list(op_ptr_, filepath.c_str()); + if (ret.error != nullptr) { + THROWOPENDALERROR(ret.error, "ListObjects"); + } + auto lister = OpendalLister(ret.lister); + std::vector objects; + opendal_result_lister_next result = opendal_lister_next(lister.Get()); + if (result.error != nullptr) { + THROWOPENDALERROR(result.error, "ListObjects"); + } + auto entry = result.entry; + while (entry) { + const char* de_path = opendal_entry_path(entry); + objects.push_back(std::string(de_path)); + opendal_entry_free(entry); + result = opendal_lister_next(lister.Get()); + if (result.error != nullptr) { + THROWOPENDALERROR(result.error, "ListObjects"); + } + entry = result.entry; + } + return objects; +} + +uint64_t +OpenDALChunkManager::Read(const std::string& filepath, + void* buf, + uint64_t size) { + auto ret = opendal_operator_reader(op_ptr_, filepath.c_str()); + if (ret.error != nullptr) { + THROWOPENDALERROR(ret.error, "GetObjectBuffer"); + } + auto reader = OpendalReader(ret.reader); + uint64_t buf_size = 16 * 1024; + uint64_t buf_index = 0; + while (true) { + auto read_ret = + opendal_reader_read(reader.Get(), + reinterpret_cast(buf) + buf_index, + buf_size); + buf_index += read_ret.size; + if (read_ret.error != nullptr) { + THROWOPENDALERROR(read_ret.error, "GetObjectBuffer"); + } + if (read_ret.size == 0) { + break; + } + } + if (buf_index != size) { + throw SegcoreError( + S3Error, + fmt::format( + "Read size mismatch, target size is {}, actual size is {}", + size, + buf_index)); + } + return buf_index; +} + +void +OpenDALChunkManager::Write(const std::string& filepath, + void* buf, + uint64_t size) { + auto ret = opendal_operator_write( + op_ptr_, filepath.c_str(), {reinterpret_cast(buf), size}); + if (ret != nullptr) { + THROWOPENDALERROR(ret, "Write"); + } +} + +} // namespace milvus::storage diff --git a/internal/core/src/storage/OpenDALChunkManager.h b/internal/core/src/storage/OpenDALChunkManager.h new file mode 100644 index 0000000000000..30deb922c69b5 --- /dev/null +++ b/internal/core/src/storage/OpenDALChunkManager.h @@ -0,0 +1,106 @@ +#pragma once + +#include +#include +#include +#include + +#include "common/EasyAssert.h" +#include "storage/ChunkManager.h" +#include "storage/Types.h" +#include "opendal.h" + +namespace milvus::storage { +class OpenDALChunkManager : public ChunkManager { + public: + OpenDALChunkManager() = default; + explicit OpenDALChunkManager(const StorageConfig& storage_config); + + OpenDALChunkManager(const OpenDALChunkManager&); + OpenDALChunkManager& + operator=(const OpenDALChunkManager&); + + public: + virtual ~OpenDALChunkManager(); + + bool + Exist(const std::string& filepath) override; + + uint64_t + Size(const std::string& filepath) override; + + uint64_t + Read(const std::string& filepath, + uint64_t offset, + void* buf, + uint64_t len) override { + throw SegcoreError(NotImplemented, + GetName() + "Read with offset not implement"); + } + + void + Write(const std::string& filepath, + uint64_t offset, + void* buf, + uint64_t len) override { + throw SegcoreError(NotImplemented, + GetName() + "Write with offset not implement"); + } + + uint64_t + Read(const std::string& filepath, void* buf, uint64_t len) override; + + void + Write(const std::string& filepath, void* buf, uint64_t len) override; + + std::vector + ListWithPrefix(const std::string& filepath) override; + + void + Remove(const std::string& filepath) override; + + std::string + GetName() const override { + return "OpenDALChunkManager"; + } + + std::string + GetRootPath() const override { + return remote_root_path_; + } + + private: + std::string default_bucket_name_; + std::string remote_root_path_; + + const opendal_operator* op_ptr_; +}; +struct OpendalReader { + explicit OpendalReader(opendal_reader* reader) : reader_(reader) { + } + ~OpendalReader() { + opendal_reader_free(reader_); + } + opendal_reader* + Get() { + return reader_; + } + + private: + opendal_reader* reader_; +}; +struct OpendalLister { + explicit OpendalLister(opendal_lister* lister) : lister_(lister) { + } + ~OpendalLister() { + opendal_lister_free(lister_); + } + opendal_lister* + Get() { + return lister_; + } + + private: + opendal_lister* lister_; +}; +} // namespace milvus::storage diff --git a/internal/core/src/storage/RemoteChunkManagerSingleton.h b/internal/core/src/storage/RemoteChunkManagerSingleton.h index 75a070497c417..7f8cded0cfd61 100644 --- a/internal/core/src/storage/RemoteChunkManagerSingleton.h +++ b/internal/core/src/storage/RemoteChunkManagerSingleton.h @@ -20,6 +20,7 @@ #include #include "storage/Util.h" +#include "opendal.h" namespace milvus::storage { diff --git a/internal/core/src/storage/Util.cpp b/internal/core/src/storage/Util.cpp index d5f41f8abb209..7b762f4f8d7d7 100644 --- a/internal/core/src/storage/Util.cpp +++ b/internal/core/src/storage/Util.cpp @@ -22,6 +22,7 @@ #include "common/EasyAssert.h" #include "common/Consts.h" #include "fmt/format.h" +#include "storage/ChunkManager.h" #ifdef AZURE_BUILD_DIR #include "storage/AzureChunkManager.h" #endif @@ -31,6 +32,7 @@ #include "storage/ThreadPools.h" #include "storage/LocalChunkManager.h" #include "storage/MinioChunkManager.h" +#include "storage/OpenDALChunkManager.h" #include "storage/MemFileManagerImpl.h" #include "storage/DiskFileManagerImpl.h" @@ -39,7 +41,8 @@ namespace milvus::storage { std::map ChunkManagerType_Map = { {"local", ChunkManagerType::Local}, {"minio", ChunkManagerType::Minio}, - {"remote", ChunkManagerType::Remote}}; + {"remote", ChunkManagerType::Remote}, + {"opendal", ChunkManagerType::OpenDAL}}; enum class CloudProviderType : int8_t { UNKNOWN = 0, @@ -448,45 +451,6 @@ EncodeAndUploadFieldSlice(ChunkManager* chunk_manager, return std::make_pair(std::move(object_key), serialized_index_size); } -// /** -// * Returns the current resident set size (physical memory use) measured -// * in bytes, or zero if the value cannot be determined on this OS. -// */ -// size_t -// getCurrentRSS() { -// #if defined(_WIN32) -// /* Windows -------------------------------------------------- */ -// PROCESS_MEMORY_COUNTERS info; -// GetProcessMemoryInfo(GetCurrentProcess(), &info, sizeof(info)); -// return (size_t)info.WorkingSetSize; - -// #elif defined(__APPLE__) && defined(__MACH__) -// /* OSX ------------------------------------------------------ */ -// struct mach_task_basic_info info; -// mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT; -// if (task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t)&info, &infoCount) != KERN_SUCCESS) -// return (size_t)0L; /* Can't access? */ -// return (size_t)info.resident_size; - -// #elif defined(__linux__) || defined(__linux) || defined(linux) || defined(__gnu_linux__) -// /* Linux ---------------------------------------------------- */ -// long rss = 0L; -// FILE* fp = NULL; -// if ((fp = fopen("/proc/self/statm", "r")) == NULL) -// return (size_t)0L; /* Can't open? */ -// if (fscanf(fp, "%*s%ld", &rss) != 1) { -// fclose(fp); -// return (size_t)0L; /* Can't read? */ -// } -// fclose(fp); -// return (size_t)rss * (size_t)sysconf(_SC_PAGESIZE); - -// #else -// /* AIX, BSD, Solaris, and Unknown OS ------------------------ */ -// return (size_t)0L; /* Unsupported. */ -// #endif -// } - std::vector GetObjectData(ChunkManager* remote_chunk_manager, const std::vector& remote_files) { @@ -608,6 +572,9 @@ CreateChunkManager(const StorageConfig& storage_config) { } } } + case ChunkManagerType::OpenDAL: { + return std::make_shared(storage_config); + } default: { PanicInfo(ConfigInvalid, diff --git a/internal/core/src/storage/storage_c.cpp b/internal/core/src/storage/storage_c.cpp index fb7d20879b5bc..dd42256aad5e0 100644 --- a/internal/core/src/storage/storage_c.cpp +++ b/internal/core/src/storage/storage_c.cpp @@ -66,6 +66,8 @@ InitRemoteChunkManagerSingleton(CStorageConfig c_storage_config) { std::string(c_storage_config.cloud_provider); storage_config.iam_endpoint = std::string(c_storage_config.iam_endpoint); + storage_config.cloud_provider = + std::string(c_storage_config.cloud_provider); storage_config.log_level = std::string(c_storage_config.log_level); storage_config.useSSL = c_storage_config.useSSL; storage_config.useIAM = c_storage_config.useIAM; diff --git a/internal/core/thirdparty/CMakeLists.txt b/internal/core/thirdparty/CMakeLists.txt index 98b628d541553..0eb2de1d850bc 100644 --- a/internal/core/thirdparty/CMakeLists.txt +++ b/internal/core/thirdparty/CMakeLists.txt @@ -36,6 +36,7 @@ add_subdirectory(boost_ext) add_subdirectory(rocksdb) add_subdirectory(rdkafka) add_subdirectory(simdjson) +add_subdirectory(opendal) if (LINUX) add_subdirectory(jemalloc) diff --git a/internal/core/thirdparty/opendal/CMakeLists.txt b/internal/core/thirdparty/opendal/CMakeLists.txt new file mode 100644 index 0000000000000..25fd05e83c544 --- /dev/null +++ b/internal/core/thirdparty/opendal/CMakeLists.txt @@ -0,0 +1,31 @@ +#------------------------------------------------------------------------------- +# Copyright (C) 2019-2020 Zilliz. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under the License. +#------------------------------------------------------------------------------- + +# ---------------------------------------------------------------------- +message(STATUS "Building (vendored) opendal from source") + +set(OPENDAL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") +set(OPENDAL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include") +set(OPENDAL_NAME "libopendal_c${CMAKE_STATIC_LIBRARY_SUFFIX}") + +add_library(opendal STATIC IMPORTED) +set_target_properties(opendal + PROPERTIES + IMPORTED_GLOBAL TRUE + IMPORTED_LOCATION "${OPENDAL_LIB_DIR}/${OPENDAL_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/include") + +get_target_property(OPENDAL_IMPORTED_LOCATION opendal IMPORTED_LOCATION) +get_target_property(OPENDAL_INTERFACE_INCLUDE_DIRECTORIES opendal INTERFACE_INCLUDE_DIRECTORIES) +message("OPENDAL_IMPORTED_LOCATION: ${OPENDAL_IMPORTED_LOCATION}") +message("OPENDAL_INTERFACE_INCLUDE_DIRECTORIES: ${OPENDAL_INTERFACE_INCLUDE_DIRECTORIES}") diff --git a/internal/core/unittest/test_sealed.cpp b/internal/core/unittest/test_sealed.cpp index f4b507d9553e2..8c16643e1ce61 100644 --- a/internal/core/unittest/test_sealed.cpp +++ b/internal/core/unittest/test_sealed.cpp @@ -1181,7 +1181,7 @@ TEST(Sealed, GetVectorFromChunkCache) { auto sc = milvus::storage::StorageConfig{}; milvus::storage::RemoteChunkManagerSingleton::GetInstance().Init(sc); auto mcm = std::make_unique(sc); - mcm->CreateBucket(sc.bucket_name); + // mcm->CreateBucket(sc.bucket_name); milvus::storage::ChunkCacheSingleton::GetInstance().Init(mmap_dir, "willneed"); diff --git a/internal/storage/factory.go b/internal/storage/factory.go index 24a71cbf2985d..dd13fd3e59435 100644 --- a/internal/storage/factory.go +++ b/internal/storage/factory.go @@ -48,7 +48,7 @@ func (f *ChunkManagerFactory) newChunkManager(ctx context.Context, engine string switch engine { case "local": return NewLocalChunkManager(RootPath(f.config.rootPath)), nil - case "minio": + case "minio", "opendal": return newMinioChunkManagerWithConfig(ctx, f.config) case "remote": return NewRemoteChunkManager(ctx, f.config) diff --git a/internal/util/indexcgowrapper/build_index_info.go b/internal/util/indexcgowrapper/build_index_info.go index ba2431820274d..18ed970818a5d 100644 --- a/internal/util/indexcgowrapper/build_index_info.go +++ b/internal/util/indexcgowrapper/build_index_info.go @@ -48,18 +48,18 @@ func NewBuildIndexInfo(config *indexpb.StorageConfig) (*BuildIndexInfo, error) { cAccessValue := C.CString(config.SecretAccessKey) cRootPath := C.CString(config.RootPath) cStorageType := C.CString(config.StorageType) - cCloudProvider := C.CString(config.CloudProvider) cIamEndPoint := C.CString(config.IAMEndpoint) cRegion := C.CString(config.Region) + cCloudProvider := C.CString(config.CloudProvider) defer C.free(unsafe.Pointer(cAddress)) defer C.free(unsafe.Pointer(cBucketName)) defer C.free(unsafe.Pointer(cAccessKey)) defer C.free(unsafe.Pointer(cAccessValue)) defer C.free(unsafe.Pointer(cRootPath)) defer C.free(unsafe.Pointer(cStorageType)) - defer C.free(unsafe.Pointer(cCloudProvider)) defer C.free(unsafe.Pointer(cIamEndPoint)) defer C.free(unsafe.Pointer(cRegion)) + defer C.free(unsafe.Pointer(cCloudProvider)) storageConfig := C.CStorageConfig{ address: cAddress, bucket_name: cBucketName, @@ -67,8 +67,8 @@ func NewBuildIndexInfo(config *indexpb.StorageConfig) (*BuildIndexInfo, error) { access_key_value: cAccessValue, root_path: cRootPath, storage_type: cStorageType, - cloud_provider: cCloudProvider, iam_endpoint: cIamEndPoint, + cloud_provider: cCloudProvider, useSSL: C.bool(config.UseSSL), useIAM: C.bool(config.UseIAM), region: cRegion, diff --git a/internal/util/initcore/init_core.go b/internal/util/initcore/init_core.go index a9cd20d56112d..9bcbca2f66faa 100644 --- a/internal/util/initcore/init_core.go +++ b/internal/util/initcore/init_core.go @@ -62,8 +62,8 @@ func InitRemoteChunkManager(params *paramtable.ComponentParam) error { cAccessValue := C.CString(params.MinioCfg.SecretAccessKey.GetValue()) cRootPath := C.CString(params.MinioCfg.RootPath.GetValue()) cStorageType := C.CString(params.CommonCfg.StorageType.GetValue()) - cCloudProvider := C.CString(params.MinioCfg.CloudProvider.GetValue()) cIamEndPoint := C.CString(params.MinioCfg.IAMEndpoint.GetValue()) + cCloudProvider := C.CString(params.MinioCfg.CloudProvider.GetValue()) cLogLevel := C.CString(params.MinioCfg.LogLevel.GetValue()) cRegion := C.CString(params.MinioCfg.Region.GetValue()) defer C.free(unsafe.Pointer(cAddress)) @@ -72,10 +72,10 @@ func InitRemoteChunkManager(params *paramtable.ComponentParam) error { defer C.free(unsafe.Pointer(cAccessValue)) defer C.free(unsafe.Pointer(cRootPath)) defer C.free(unsafe.Pointer(cStorageType)) - defer C.free(unsafe.Pointer(cCloudProvider)) defer C.free(unsafe.Pointer(cIamEndPoint)) defer C.free(unsafe.Pointer(cLogLevel)) defer C.free(unsafe.Pointer(cRegion)) + defer C.free(unsafe.Pointer(cCloudProvider)) storageConfig := C.CStorageConfig{ address: cAddress, bucket_name: cBucketName, @@ -83,8 +83,8 @@ func InitRemoteChunkManager(params *paramtable.ComponentParam) error { access_key_value: cAccessValue, root_path: cRootPath, storage_type: cStorageType, - cloud_provider: cCloudProvider, iam_endpoint: cIamEndPoint, + cloud_provider: cCloudProvider, useSSL: C.bool(params.MinioCfg.UseSSL.GetAsBool()), useIAM: C.bool(params.MinioCfg.UseIAM.GetAsBool()), log_level: cLogLevel, diff --git a/pkg/util/paramtable/component_param.go b/pkg/util/paramtable/component_param.go index e1b1f642355c3..0009e68afe05d 100644 --- a/pkg/util/paramtable/component_param.go +++ b/pkg/util/paramtable/component_param.go @@ -480,8 +480,8 @@ This configuration is only used by querynode and indexnode, it selects CPU instr p.StorageType = ParamItem{ Key: "common.storageType", Version: "2.0.0", - DefaultValue: "minio", - Doc: "please adjust in embedded Milvus: local", + DefaultValue: "opendal", + Doc: "please adjust in embedded Milvus: local, available values are [local, minio, remote, opendal]]", Export: true, } p.StorageType.Init(base.mgr) diff --git a/scripts/3rdparty_build.sh b/scripts/3rdparty_build.sh index 8b6a0554bb844..f0d2e4167d625 100644 --- a/scripts/3rdparty_build.sh +++ b/scripts/3rdparty_build.sh @@ -60,3 +60,25 @@ case "${unameOut}" in esac popd + +pushd ${ROOT_DIR}/cmake_build/thirdparty + +# git clone https://github.com/jiaoew1991/opendal.git opendal +git clone https://github.com/apache/incubator-opendal.git opendal +cd opendal +# git checkout blocking-layer +if command -v cargo >/dev/null 2>&1; then + echo "cargo exists" +else + bash -c "curl https://sh.rustup.rs -sSf | sh -s -- -y" || { echo 'rustup install failed'; exit 1;} + source $HOME/.cargo/env +fi +pushd bindings/c +cargo build || { echo 'opendal_c build failed'; exit 1; } +popd +mkdir -p ${ROOT_DIR}/internal/core/output/lib +mkdir -p ${ROOT_DIR}/internal/core/output/include +cp target/debug/libopendal_c.a ${ROOT_DIR}/internal/core/output/lib/libopendal_c.a +cp bindings/c/include/opendal.h ${ROOT_DIR}/internal/core/output/include/opendal.h + +popd diff --git a/scripts/run_cpp_codecov.sh b/scripts/run_cpp_codecov.sh index 3231062ba23a3..bd36863083f6e 100755 --- a/scripts/run_cpp_codecov.sh +++ b/scripts/run_cpp_codecov.sh @@ -81,16 +81,17 @@ ${LCOV_CMD} -a ${FILE_INFO_BASE} -a ${FILE_INFO_UT} -o ${FILE_INFO_COMBINE} # remove unnecessary info ${LCOV_CMD} -r "${FILE_INFO_COMBINE}" -o "${FILE_INFO_OUTPUT}" \ "/usr/*" \ + "*/llvm/*" \ "*/src/pb/*" \ "*/src/core/bench/*" \ - "*/faiss_ep-prefix/*" \ - "*/boost/*" \ "*/unittest/*" \ - "*/thirdparty/*" + "*/thirdparty/*" \ + "*/3rdparty_download/*" \ + "*/.conan/data/*" # generate html report -#${LCOV_GEN_CMD} ${FILE_INFO_OUTPUT} --output-directory ${DIR_LCOV_OUTPUT}/ -#echo "Generate cpp code coverage report to ${DIR_LCOV_OUTPUT}" +${LCOV_GEN_CMD} ${FILE_INFO_OUTPUT} --output-directory ${DIR_LCOV_OUTPUT}/ +echo "Generate cpp code coverage report to ${DIR_LCOV_OUTPUT}" endTime=`date +%s`