#4307 expand load_collection to load partition (#4443)

Signed-off-by: yhmo <yihua.mo@zilliz.com>
pull/4474/head
groot 2020-12-11 03:44:48 -06:00 committed by GitHub
parent 62098d760e
commit 805212a0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 928 additions and 220 deletions

View File

@ -72,7 +72,7 @@ class DB {
virtual Status
PreloadCollection(const std::shared_ptr<server::Context>& context, const std::string& collection_id,
bool force = false) = 0;
const std::vector<std::string>& partition_tags, bool force = false) = 0;
virtual Status
ReLoadSegmentsDeletedDocs(const std::string& collection_id, const std::vector<int64_t>& segment_ids) = 0;

View File

@ -429,51 +429,60 @@ DBImpl::GetCollectionInfo(const std::string& collection_id, std::string& collect
Status
DBImpl::PreloadCollection(const std::shared_ptr<server::Context>& context, const std::string& collection_id,
bool force) {
const std::vector<std::string>& partition_tags, bool force) {
if (!initialized_.load(std::memory_order_acquire)) {
return SHUTDOWN_ERROR;
}
// step 1: get all collection files from parent collection
meta::FilesHolder files_holder;
#if 0
auto status = meta_ptr_->FilesToSearch(collection_id, files_holder);
if (!status.ok()) {
return status;
}
// step 2: get files from partition collections
std::vector<meta::CollectionSchema> partition_array;
status = meta_ptr_->ShowPartitions(collection_id, partition_array);
for (auto& schema : partition_array) {
status = meta_ptr_->FilesToSearch(schema.collection_id_, files_holder);
}
#else
auto status = meta_ptr_->FilesToSearch(collection_id, files_holder);
if (!status.ok()) {
return status;
}
std::vector<meta::CollectionSchema> partition_array;
status = meta_ptr_->ShowPartitions(collection_id, partition_array);
Status status;
std::set<std::string> partition_ids;
for (auto& schema : partition_array) {
partition_ids.insert(schema.collection_id_);
meta::FilesHolder files_holder;
if (partition_tags.empty()) {
// no partition tag specified, means load whole collection
// get files from root collection
auto status = meta_ptr_->FilesToSearch(collection_id, files_holder);
if (!status.ok()) {
return status;
}
// count all partitions
std::vector<meta::CollectionSchema> partition_array;
status = meta_ptr_->ShowPartitions(collection_id, partition_array);
for (auto& schema : partition_array) {
partition_ids.insert(schema.collection_id_);
}
} else {
// get specified partitions
std::set<std::string> partition_name_array;
status = GetPartitionsByTags(collection_id, partition_tags, partition_name_array);
if (!status.ok()) {
return status; // didn't match any partition.
}
for (auto& partition_name : partition_name_array) {
partition_ids.insert(partition_name);
}
}
// get files from partitions
status = meta_ptr_->FilesToSearchEx(collection_id, partition_ids, files_holder);
if (!status.ok()) {
return status;
}
#endif
if (files_holder.HoldFiles().empty()) {
LOG_ENGINE_DEBUG_ << "Could not get any file to load";
return Status::OK(); // no files to search
}
int64_t size = 0;
int64_t cache_total = cache::CpuCacheMgr::GetInstance()->CacheCapacity();
int64_t cache_usage = cache::CpuCacheMgr::GetInstance()->CacheUsage();
int64_t available_size = cache_total - cache_usage;
// step 3: load file one by one
// step 2: load file one by one
milvus::engine::meta::SegmentsSchema& files_array = files_holder.HoldFiles();
LOG_ENGINE_DEBUG_ << "Begin pre-load collection:" + collection_id + ", totally " << files_array.size()
<< " files need to be pre-loaded";

View File

@ -79,7 +79,7 @@ class DBImpl : public DB, public server::CacheConfigHandler, public server::Engi
Status
PreloadCollection(const std::shared_ptr<server::Context>& context, const std::string& collection_id,
bool force = false) override;
const std::vector<std::string>& partition_tags, bool force = false) override;
Status
ReLoadSegmentsDeletedDocs(const std::string& collection_id, const std::vector<int64_t>& segment_ids) override;

View File

@ -727,11 +727,11 @@ void MilvusService::Stub::experimental_async::DeleteByID(::grpc::ClientContext*
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_DeleteByID_, context, request, false);
}
::grpc::Status MilvusService::Stub::PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::milvus::grpc::Status* response) {
::grpc::Status MilvusService::Stub::PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::milvus::grpc::Status* response) {
return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_PreloadCollection_, context, request, response);
}
void MilvusService::Stub::experimental_async::PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)> f) {
void MilvusService::Stub::experimental_async::PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)> f) {
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_PreloadCollection_, context, request, response, std::move(f));
}
@ -739,7 +739,7 @@ void MilvusService::Stub::experimental_async::PreloadCollection(::grpc::ClientCo
::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_PreloadCollection_, context, request, response, std::move(f));
}
void MilvusService::Stub::experimental_async::PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
void MilvusService::Stub::experimental_async::PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_PreloadCollection_, context, request, response, reactor);
}
@ -747,11 +747,11 @@ void MilvusService::Stub::experimental_async::PreloadCollection(::grpc::ClientCo
::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_PreloadCollection_, context, request, response, reactor);
}
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) {
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::AsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) {
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_PreloadCollection_, context, request, true);
}
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::PrepareAsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) {
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* MilvusService::Stub::PrepareAsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) {
return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::milvus::grpc::Status>::Create(channel_.get(), cq, rpcmethod_PreloadCollection_, context, request, false);
}
@ -1345,7 +1345,7 @@ MilvusService::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod(
MilvusService_method_names[22],
::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::CollectionName, ::milvus::grpc::Status>(
new ::grpc::internal::RpcMethodHandler< MilvusService::Service, ::milvus::grpc::PreloadCollectionParam, ::milvus::grpc::Status>(
std::mem_fn(&MilvusService::Service::PreloadCollection), this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
MilvusService_method_names[23],
@ -1591,7 +1591,7 @@ MilvusService::Service::~Service() {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
::grpc::Status MilvusService::Service::PreloadCollection(::grpc::ServerContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response) {
::grpc::Status MilvusService::Service::PreloadCollection(::grpc::ServerContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response) {
(void) context;
(void) request;
(void) response;

View File

@ -334,16 +334,16 @@ class MilvusService final {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(PrepareAsyncDeleteByIDRaw(context, request, cq));
}
// *
// @brief This method is used to preload collection
// @brief This method is used to preload collection/partitions
//
// @param CollectionName, target collection name.
// @param PreloadCollectionParam, target collection/partitions.
//
// @return Status
virtual ::grpc::Status PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::milvus::grpc::Status* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> AsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) {
virtual ::grpc::Status PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::milvus::grpc::Status* response) = 0;
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> AsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(AsyncPreloadCollectionRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> PrepareAsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) {
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>> PrepareAsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>>(PrepareAsyncPreloadCollectionRaw(context, request, cq));
}
// *
@ -720,14 +720,14 @@ class MilvusService final {
virtual void DeleteByID(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByIDParam* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
virtual void DeleteByID(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
// *
// @brief This method is used to preload collection
// @brief This method is used to preload collection/partitions
//
// @param CollectionName, target collection name.
// @param PreloadCollectionParam, target collection/partitions.
//
// @return Status
virtual void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) = 0;
virtual void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) = 0;
virtual void PreloadCollection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) = 0;
virtual void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
virtual void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
virtual void PreloadCollection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
// *
// @brief This method is used to reload collection segments
@ -875,8 +875,8 @@ class MilvusService final {
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::StringReply>* PrepareAsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncDeleteByIDRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByIDParam& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncDeleteByIDRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByIDParam& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncReloadSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::ReLoadSegmentsParam& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* PrepareAsyncReloadSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::ReLoadSegmentsParam& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::milvus::grpc::Status>* AsyncFlushRaw(::grpc::ClientContext* context, const ::milvus::grpc::FlushParam& request, ::grpc::CompletionQueue* cq) = 0;
@ -1069,11 +1069,11 @@ class MilvusService final {
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> PrepareAsyncDeleteByID(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByIDParam& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(PrepareAsyncDeleteByIDRaw(context, request, cq));
}
::grpc::Status PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::milvus::grpc::Status* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> AsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) {
::grpc::Status PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::milvus::grpc::Status* response) override;
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> AsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(AsyncPreloadCollectionRaw(context, request, cq));
}
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> PrepareAsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) {
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>> PrepareAsyncPreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>>(PrepareAsyncPreloadCollectionRaw(context, request, cq));
}
::grpc::Status ReloadSegments(::grpc::ClientContext* context, const ::milvus::grpc::ReLoadSegmentsParam& request, ::milvus::grpc::Status* response) override;
@ -1286,9 +1286,9 @@ class MilvusService final {
void DeleteByID(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) override;
void DeleteByID(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByIDParam* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void DeleteByID(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) override;
void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) override;
void PreloadCollection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) override;
void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void PreloadCollection(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void PreloadCollection(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
void ReloadSegments(::grpc::ClientContext* context, const ::milvus::grpc::ReLoadSegmentsParam* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) override;
void ReloadSegments(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::milvus::grpc::Status* response, std::function<void(::grpc::Status)>) override;
@ -1413,8 +1413,8 @@ class MilvusService final {
::grpc::ClientAsyncResponseReader< ::milvus::grpc::StringReply>* PrepareAsyncCmdRaw(::grpc::ClientContext* context, const ::milvus::grpc::Command& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncDeleteByIDRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByIDParam& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncDeleteByIDRaw(::grpc::ClientContext* context, const ::milvus::grpc::DeleteByIDParam& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::CollectionName& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncPreloadCollectionRaw(::grpc::ClientContext* context, const ::milvus::grpc::PreloadCollectionParam& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncReloadSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::ReLoadSegmentsParam& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* PrepareAsyncReloadSegmentsRaw(::grpc::ClientContext* context, const ::milvus::grpc::ReLoadSegmentsParam& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::milvus::grpc::Status>* AsyncFlushRaw(::grpc::ClientContext* context, const ::milvus::grpc::FlushParam& request, ::grpc::CompletionQueue* cq) override;
@ -1651,12 +1651,12 @@ class MilvusService final {
// @return status
virtual ::grpc::Status DeleteByID(::grpc::ServerContext* context, const ::milvus::grpc::DeleteByIDParam* request, ::milvus::grpc::Status* response);
// *
// @brief This method is used to preload collection
// @brief This method is used to preload collection/partitions
//
// @param CollectionName, target collection name.
// @param PreloadCollectionParam, target collection/partitions.
//
// @return Status
virtual ::grpc::Status PreloadCollection(::grpc::ServerContext* context, const ::milvus::grpc::CollectionName* request, ::milvus::grpc::Status* response);
virtual ::grpc::Status PreloadCollection(::grpc::ServerContext* context, const ::milvus::grpc::PreloadCollectionParam* request, ::milvus::grpc::Status* response);
// *
// @brief This method is used to reload collection segments
//
@ -2158,11 +2158,11 @@ class MilvusService final {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::CollectionName* /*request*/, ::milvus::grpc::Status* /*response*/) override {
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::PreloadCollectionParam* /*request*/, ::milvus::grpc::Status* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestPreloadCollection(::grpc::ServerContext* context, ::milvus::grpc::CollectionName* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
void RequestPreloadCollection(::grpc::ServerContext* context, ::milvus::grpc::PreloadCollectionParam* request, ::grpc::ServerAsyncResponseWriter< ::milvus::grpc::Status>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncUnary(22, context, request, response, new_call_cq, notification_cq, tag);
}
};
@ -3196,17 +3196,17 @@ class MilvusService final {
public:
ExperimentalWithCallbackMethod_PreloadCollection() {
::grpc::Service::experimental().MarkMethodCallback(22,
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::CollectionName, ::milvus::grpc::Status>(
new ::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::PreloadCollectionParam, ::milvus::grpc::Status>(
[this](::grpc::ServerContext* context,
const ::milvus::grpc::CollectionName* request,
const ::milvus::grpc::PreloadCollectionParam* request,
::milvus::grpc::Status* response,
::grpc::experimental::ServerCallbackRpcController* controller) {
return this->PreloadCollection(context, request, response, controller);
}));
}
void SetMessageAllocatorFor_PreloadCollection(
::grpc::experimental::MessageAllocator< ::milvus::grpc::CollectionName, ::milvus::grpc::Status>* allocator) {
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::CollectionName, ::milvus::grpc::Status>*>(
::grpc::experimental::MessageAllocator< ::milvus::grpc::PreloadCollectionParam, ::milvus::grpc::Status>* allocator) {
static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::milvus::grpc::PreloadCollectionParam, ::milvus::grpc::Status>*>(
::grpc::Service::experimental().GetHandler(22))
->SetMessageAllocator(allocator);
}
@ -3214,11 +3214,11 @@ class MilvusService final {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::CollectionName* /*request*/, ::milvus::grpc::Status* /*response*/) override {
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::PreloadCollectionParam* /*request*/, ::milvus::grpc::Status* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual void PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::CollectionName* /*request*/, ::milvus::grpc::Status* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
virtual void PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::PreloadCollectionParam* /*request*/, ::milvus::grpc::Status* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); }
};
template <class BaseClass>
class ExperimentalWithCallbackMethod_ReloadSegments : public BaseClass {
@ -4134,7 +4134,7 @@ class MilvusService final {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::CollectionName* /*request*/, ::milvus::grpc::Status* /*response*/) override {
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::PreloadCollectionParam* /*request*/, ::milvus::grpc::Status* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@ -4880,7 +4880,7 @@ class MilvusService final {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::CollectionName* /*request*/, ::milvus::grpc::Status* /*response*/) override {
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::PreloadCollectionParam* /*request*/, ::milvus::grpc::Status* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@ -5797,7 +5797,7 @@ class MilvusService final {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::CollectionName* /*request*/, ::milvus::grpc::Status* /*response*/) override {
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::PreloadCollectionParam* /*request*/, ::milvus::grpc::Status* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
@ -6675,18 +6675,18 @@ class MilvusService final {
public:
WithStreamedUnaryMethod_PreloadCollection() {
::grpc::Service::MarkMethodStreamed(22,
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::CollectionName, ::milvus::grpc::Status>(std::bind(&WithStreamedUnaryMethod_PreloadCollection<BaseClass>::StreamedPreloadCollection, this, std::placeholders::_1, std::placeholders::_2)));
new ::grpc::internal::StreamedUnaryHandler< ::milvus::grpc::PreloadCollectionParam, ::milvus::grpc::Status>(std::bind(&WithStreamedUnaryMethod_PreloadCollection<BaseClass>::StreamedPreloadCollection, this, std::placeholders::_1, std::placeholders::_2)));
}
~WithStreamedUnaryMethod_PreloadCollection() override {
BaseClassMustBeDerivedFromService(this);
}
// disable regular version of this method
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::CollectionName* /*request*/, ::milvus::grpc::Status* /*response*/) override {
::grpc::Status PreloadCollection(::grpc::ServerContext* /*context*/, const ::milvus::grpc::PreloadCollectionParam* /*request*/, ::milvus::grpc::Status* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
// replace default version of method with streamed unary
virtual ::grpc::Status StreamedPreloadCollection(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::CollectionName,::milvus::grpc::Status>* server_unary_streamer) = 0;
virtual ::grpc::Status StreamedPreloadCollection(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::milvus::grpc::PreloadCollectionParam,::milvus::grpc::Status>* server_unary_streamer) = 0;
};
template <class BaseClass>
class WithStreamedUnaryMethod_ReloadSegments : public BaseClass {

View File

@ -82,6 +82,10 @@ class SearchByIDParamDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SearchByIDParam> _instance;
} _SearchByIDParam_default_instance_;
class PreloadCollectionParamDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PreloadCollectionParam> _instance;
} _PreloadCollectionParam_default_instance_;
class ReLoadSegmentsParamDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ReLoadSegmentsParam> _instance;
@ -747,6 +751,20 @@ static void InitDefaultsscc_info_PartitionParam_milvus_2eproto() {
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PartitionParam_milvus_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_PartitionParam_milvus_2eproto}, {}};
static void InitDefaultsscc_info_PreloadCollectionParam_milvus_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::grpc::_PreloadCollectionParam_default_instance_;
new (ptr) ::milvus::grpc::PreloadCollectionParam();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::grpc::PreloadCollectionParam::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PreloadCollectionParam_milvus_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_PreloadCollectionParam_milvus_2eproto}, {}};
static void InitDefaultsscc_info_RangeQuery_milvus_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
@ -972,7 +990,7 @@ static void InitDefaultsscc_info_VectorsIdentity_milvus_2eproto() {
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VectorsIdentity_milvus_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_VectorsIdentity_milvus_2eproto}, {}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[49];
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_milvus_2eproto[50];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_milvus_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_milvus_2eproto = nullptr;
@ -1074,6 +1092,13 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_milvus_2eproto::offsets[] PROT
PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchByIDParam, topk_),
PROTOBUF_FIELD_OFFSET(::milvus::grpc::SearchByIDParam, extra_params_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::grpc::PreloadCollectionParam, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::grpc::PreloadCollectionParam, collection_name_),
PROTOBUF_FIELD_OFFSET(::milvus::grpc::PreloadCollectionParam, partition_tag_array_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::grpc::ReLoadSegmentsParam, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
@ -1381,43 +1406,44 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{ 69, -1, sizeof(::milvus::grpc::SearchParam)},
{ 79, -1, sizeof(::milvus::grpc::SearchInFilesParam)},
{ 86, -1, sizeof(::milvus::grpc::SearchByIDParam)},
{ 96, -1, sizeof(::milvus::grpc::ReLoadSegmentsParam)},
{ 103, -1, sizeof(::milvus::grpc::TopKQueryResult)},
{ 112, -1, sizeof(::milvus::grpc::StringReply)},
{ 119, -1, sizeof(::milvus::grpc::BoolReply)},
{ 126, -1, sizeof(::milvus::grpc::CollectionRowCount)},
{ 133, -1, sizeof(::milvus::grpc::Command)},
{ 139, -1, sizeof(::milvus::grpc::IndexParam)},
{ 148, -1, sizeof(::milvus::grpc::FlushParam)},
{ 154, -1, sizeof(::milvus::grpc::DeleteByIDParam)},
{ 161, -1, sizeof(::milvus::grpc::CollectionInfo)},
{ 168, -1, sizeof(::milvus::grpc::VectorsIdentity)},
{ 175, -1, sizeof(::milvus::grpc::VectorsData)},
{ 182, -1, sizeof(::milvus::grpc::GetVectorIDsParam)},
{ 189, -1, sizeof(::milvus::grpc::VectorFieldParam)},
{ 195, -1, sizeof(::milvus::grpc::FieldType)},
{ 203, -1, sizeof(::milvus::grpc::FieldParam)},
{ 212, -1, sizeof(::milvus::grpc::VectorFieldValue)},
{ 218, -1, sizeof(::milvus::grpc::FieldValue)},
{ 231, -1, sizeof(::milvus::grpc::Mapping)},
{ 240, -1, sizeof(::milvus::grpc::MappingList)},
{ 247, -1, sizeof(::milvus::grpc::TermQuery)},
{ 257, -1, sizeof(::milvus::grpc::CompareExpr)},
{ 264, -1, sizeof(::milvus::grpc::RangeQuery)},
{ 273, -1, sizeof(::milvus::grpc::VectorQuery)},
{ 283, -1, sizeof(::milvus::grpc::BooleanQuery)},
{ 290, -1, sizeof(::milvus::grpc::GeneralQuery)},
{ 300, -1, sizeof(::milvus::grpc::HSearchParam)},
{ 309, -1, sizeof(::milvus::grpc::HSearchInSegmentsParam)},
{ 316, -1, sizeof(::milvus::grpc::AttrRecord)},
{ 322, -1, sizeof(::milvus::grpc::HEntity)},
{ 333, -1, sizeof(::milvus::grpc::HQueryResult)},
{ 343, -1, sizeof(::milvus::grpc::HInsertParam)},
{ 353, -1, sizeof(::milvus::grpc::HEntityIdentity)},
{ 360, -1, sizeof(::milvus::grpc::HEntityIDs)},
{ 367, -1, sizeof(::milvus::grpc::HGetEntityIDsParam)},
{ 374, -1, sizeof(::milvus::grpc::HDeleteByIDParam)},
{ 381, -1, sizeof(::milvus::grpc::HIndexParam)},
{ 96, -1, sizeof(::milvus::grpc::PreloadCollectionParam)},
{ 103, -1, sizeof(::milvus::grpc::ReLoadSegmentsParam)},
{ 110, -1, sizeof(::milvus::grpc::TopKQueryResult)},
{ 119, -1, sizeof(::milvus::grpc::StringReply)},
{ 126, -1, sizeof(::milvus::grpc::BoolReply)},
{ 133, -1, sizeof(::milvus::grpc::CollectionRowCount)},
{ 140, -1, sizeof(::milvus::grpc::Command)},
{ 146, -1, sizeof(::milvus::grpc::IndexParam)},
{ 155, -1, sizeof(::milvus::grpc::FlushParam)},
{ 161, -1, sizeof(::milvus::grpc::DeleteByIDParam)},
{ 168, -1, sizeof(::milvus::grpc::CollectionInfo)},
{ 175, -1, sizeof(::milvus::grpc::VectorsIdentity)},
{ 182, -1, sizeof(::milvus::grpc::VectorsData)},
{ 189, -1, sizeof(::milvus::grpc::GetVectorIDsParam)},
{ 196, -1, sizeof(::milvus::grpc::VectorFieldParam)},
{ 202, -1, sizeof(::milvus::grpc::FieldType)},
{ 210, -1, sizeof(::milvus::grpc::FieldParam)},
{ 219, -1, sizeof(::milvus::grpc::VectorFieldValue)},
{ 225, -1, sizeof(::milvus::grpc::FieldValue)},
{ 238, -1, sizeof(::milvus::grpc::Mapping)},
{ 247, -1, sizeof(::milvus::grpc::MappingList)},
{ 254, -1, sizeof(::milvus::grpc::TermQuery)},
{ 264, -1, sizeof(::milvus::grpc::CompareExpr)},
{ 271, -1, sizeof(::milvus::grpc::RangeQuery)},
{ 280, -1, sizeof(::milvus::grpc::VectorQuery)},
{ 290, -1, sizeof(::milvus::grpc::BooleanQuery)},
{ 297, -1, sizeof(::milvus::grpc::GeneralQuery)},
{ 307, -1, sizeof(::milvus::grpc::HSearchParam)},
{ 316, -1, sizeof(::milvus::grpc::HSearchInSegmentsParam)},
{ 323, -1, sizeof(::milvus::grpc::AttrRecord)},
{ 329, -1, sizeof(::milvus::grpc::HEntity)},
{ 340, -1, sizeof(::milvus::grpc::HQueryResult)},
{ 350, -1, sizeof(::milvus::grpc::HInsertParam)},
{ 360, -1, sizeof(::milvus::grpc::HEntityIdentity)},
{ 367, -1, sizeof(::milvus::grpc::HEntityIDs)},
{ 374, -1, sizeof(::milvus::grpc::HGetEntityIDsParam)},
{ 381, -1, sizeof(::milvus::grpc::HDeleteByIDParam)},
{ 388, -1, sizeof(::milvus::grpc::HIndexParam)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
@ -1433,6 +1459,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_SearchParam_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_SearchInFilesParam_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_SearchByIDParam_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_PreloadCollectionParam_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_ReLoadSegmentsParam_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_TopKQueryResult_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::grpc::_StringReply_default_instance_),
@ -1505,7 +1532,9 @@ const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE(
"m\022\027\n\017collection_name\030\001 \001(\t\022\033\n\023partition_"
"tag_array\030\002 \003(\t\022\020\n\010id_array\030\003 \003(\003\022\014\n\004top"
"k\030\004 \001(\003\022/\n\014extra_params\030\005 \003(\0132\031.milvus.g"
"rpc.KeyValuePair\"H\n\023ReLoadSegmentsParam\022"
"rpc.KeyValuePair\"N\n\026PreloadCollectionPar"
"am\022\027\n\017collection_name\030\001 \001(\t\022\033\n\023partition"
"_tag_array\030\002 \003(\t\"H\n\023ReLoadSegmentsParam\022"
"\027\n\017collection_name\030\001 \001(\t\022\030\n\020segment_id_a"
"rray\030\002 \003(\t\"g\n\017TopKQueryResult\022#\n\006status\030"
"\001 \001(\0132\023.milvus.grpc.Status\022\017\n\007row_num\030\002 "
@ -1607,7 +1636,7 @@ const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE(
"BLE\020)\022\n\n\006VECTOR\020d\022\014\n\007UNKNOWN\020\217N*C\n\017Compa"
"reOperator\022\006\n\002LT\020\000\022\007\n\003LTE\020\001\022\006\n\002EQ\020\002\022\006\n\002G"
"T\020\003\022\007\n\003GTE\020\004\022\006\n\002NE\020\005*8\n\005Occur\022\013\n\007INVALID"
"\020\000\022\010\n\004MUST\020\001\022\n\n\006SHOULD\020\002\022\014\n\010MUST_NOT\020\0032\237"
"\020\000\022\010\n\004MUST\020\001\022\n\n\006SHOULD\020\002\022\014\n\010MUST_NOT\020\0032\247"
"\027\n\rMilvusService\022H\n\020CreateCollection\022\035.m"
"ilvus.grpc.CollectionSchema\032\023.milvus.grp"
"c.Status\"\000\022F\n\rHasCollection\022\033.milvus.grp"
@ -1648,46 +1677,46 @@ const char descriptor_table_protodef_milvus_2eproto[] PROTOBUF_SECTION_VARIABLE(
"lt\"\000\0227\n\003Cmd\022\024.milvus.grpc.Command\032\030.milv"
"us.grpc.StringReply\"\000\022A\n\nDeleteByID\022\034.mi"
"lvus.grpc.DeleteByIDParam\032\023.milvus.grpc."
"Status\"\000\022G\n\021PreloadCollection\022\033.milvus.g"
"Status\"\000\022O\n\021PreloadCollection\022#.milvus.g"
"rpc.PreloadCollectionParam\032\023.milvus.grpc"
".Status\"\000\022I\n\016ReloadSegments\022 .milvus.grp"
"c.ReLoadSegmentsParam\032\023.milvus.grpc.Stat"
"us\"\000\0227\n\005Flush\022\027.milvus.grpc.FlushParam\032\023"
".milvus.grpc.Status\"\000\022=\n\007Compact\022\033.milvu"
"s.grpc.CollectionName\032\023.milvus.grpc.Stat"
"us\"\000\022E\n\026CreateHybridCollection\022\024.milvus."
"grpc.Mapping\032\023.milvus.grpc.Status\"\000\022L\n\023H"
"asHybridCollection\022\033.milvus.grpc.Collect"
"ionName\032\026.milvus.grpc.BoolReply\"\000\022J\n\024Dro"
"pHybridCollection\022\033.milvus.grpc.Collecti"
"onName\032\023.milvus.grpc.Status\"\000\022O\n\030Describ"
"eHybridCollection\022\033.milvus.grpc.Collecti"
"onName\032\024.milvus.grpc.Mapping\"\000\022W\n\025CountH"
"ybridCollection\022\033.milvus.grpc.Collection"
"Name\032\037.milvus.grpc.CollectionRowCount\"\000\022"
"I\n\025ShowHybridCollections\022\024.milvus.grpc.C"
"ommand\032\030.milvus.grpc.MappingList\"\000\022V\n\030Sh"
"owHybridCollectionInfo\022\033.milvus.grpc.Col"
"lectionName\032\033.milvus.grpc.CollectionInfo"
"\"\000\022M\n\027PreloadHybridCollection\022\033.milvus.g"
"rpc.CollectionName\032\023.milvus.grpc.Status\""
"\000\022I\n\016ReloadSegments\022 .milvus.grpc.ReLoad"
"SegmentsParam\032\023.milvus.grpc.Status\"\000\0227\n\005"
"Flush\022\027.milvus.grpc.FlushParam\032\023.milvus."
"grpc.Status\"\000\022=\n\007Compact\022\033.milvus.grpc.C"
"ollectionName\032\023.milvus.grpc.Status\"\000\022E\n\026"
"CreateHybridCollection\022\024.milvus.grpc.Map"
"ping\032\023.milvus.grpc.Status\"\000\022L\n\023HasHybrid"
"Collection\022\033.milvus.grpc.CollectionName\032"
"\026.milvus.grpc.BoolReply\"\000\022J\n\024DropHybridC"
"ollection\022\033.milvus.grpc.CollectionName\032\023"
".milvus.grpc.Status\"\000\022O\n\030DescribeHybridC"
"ollection\022\033.milvus.grpc.CollectionName\032\024"
".milvus.grpc.Mapping\"\000\022W\n\025CountHybridCol"
"lection\022\033.milvus.grpc.CollectionName\032\037.m"
"ilvus.grpc.CollectionRowCount\"\000\022I\n\025ShowH"
"ybridCollections\022\024.milvus.grpc.Command\032\030"
".milvus.grpc.MappingList\"\000\022V\n\030ShowHybrid"
"CollectionInfo\022\033.milvus.grpc.CollectionN"
"ame\032\033.milvus.grpc.CollectionInfo\"\000\022M\n\027Pr"
"eloadHybridCollection\022\033.milvus.grpc.Coll"
"ectionName\032\023.milvus.grpc.Status\"\000\022D\n\014Ins"
"ertEntity\022\031.milvus.grpc.HInsertParam\032\027.m"
"ilvus.grpc.HEntityIDs\"\000\022I\n\014HybridSearch\022"
"\031.milvus.grpc.HSearchParam\032\034.milvus.grpc"
".TopKQueryResult\"\000\022]\n\026HybridSearchInSegm"
"ents\022#.milvus.grpc.HSearchInSegmentsPara"
"m\032\034.milvus.grpc.TopKQueryResult\"\000\022E\n\rGet"
"EntityByID\022\034.milvus.grpc.HEntityIdentity"
"\032\024.milvus.grpc.HEntity\"\000\022J\n\014GetEntityIDs"
"\022\037.milvus.grpc.HGetEntityIDsParam\032\027.milv"
"us.grpc.HEntityIDs\"\000\022J\n\022DeleteEntitiesBy"
"ID\022\035.milvus.grpc.HDeleteByIDParam\032\023.milv"
"us.grpc.Status\"\000b\006proto3"
"\000\022D\n\014InsertEntity\022\031.milvus.grpc.HInsertP"
"aram\032\027.milvus.grpc.HEntityIDs\"\000\022I\n\014Hybri"
"dSearch\022\031.milvus.grpc.HSearchParam\032\034.mil"
"vus.grpc.TopKQueryResult\"\000\022]\n\026HybridSear"
"chInSegments\022#.milvus.grpc.HSearchInSegm"
"entsParam\032\034.milvus.grpc.TopKQueryResult\""
"\000\022E\n\rGetEntityByID\022\034.milvus.grpc.HEntity"
"Identity\032\024.milvus.grpc.HEntity\"\000\022J\n\014GetE"
"ntityIDs\022\037.milvus.grpc.HGetEntityIDsPara"
"m\032\027.milvus.grpc.HEntityIDs\"\000\022J\n\022DeleteEn"
"titiesByID\022\035.milvus.grpc.HDeleteByIDPara"
"m\032\023.milvus.grpc.Status\"\000b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_milvus_2eproto_deps[1] = {
&::descriptor_table_status_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[48] = {
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_milvus_2eproto_sccs[49] = {
&scc_info_AttrRecord_milvus_2eproto.base,
&scc_info_BoolReply_milvus_2eproto.base,
&scc_info_BooleanQuery_milvus_2eproto.base,
@ -1721,6 +1750,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil
&scc_info_MappingList_milvus_2eproto.base,
&scc_info_PartitionList_milvus_2eproto.base,
&scc_info_PartitionParam_milvus_2eproto.base,
&scc_info_PreloadCollectionParam_milvus_2eproto.base,
&scc_info_RangeQuery_milvus_2eproto.base,
&scc_info_ReLoadSegmentsParam_milvus_2eproto.base,
&scc_info_RowRecord_milvus_2eproto.base,
@ -1740,10 +1770,10 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_mil
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_milvus_2eproto_once;
static bool descriptor_table_milvus_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_milvus_2eproto = {
&descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 8384,
&descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 48, 1,
&descriptor_table_milvus_2eproto_initialized, descriptor_table_protodef_milvus_2eproto, "milvus.proto", 8472,
&descriptor_table_milvus_2eproto_once, descriptor_table_milvus_2eproto_sccs, descriptor_table_milvus_2eproto_deps, 49, 1,
schemas, file_default_instances, TableStruct_milvus_2eproto::offsets,
file_level_metadata_milvus_2eproto, 49, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto,
file_level_metadata_milvus_2eproto, 50, file_level_enum_descriptors_milvus_2eproto, file_level_service_descriptors_milvus_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
@ -6408,6 +6438,335 @@ void SearchByIDParam::InternalSwap(SearchByIDParam* other) {
}
// ===================================================================
void PreloadCollectionParam::InitAsDefaultInstance() {
}
class PreloadCollectionParam::_Internal {
public:
};
PreloadCollectionParam::PreloadCollectionParam()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:milvus.grpc.PreloadCollectionParam)
}
PreloadCollectionParam::PreloadCollectionParam(const PreloadCollectionParam& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
partition_tag_array_(from.partition_tag_array_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.collection_name().empty()) {
collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_);
}
// @@protoc_insertion_point(copy_constructor:milvus.grpc.PreloadCollectionParam)
}
void PreloadCollectionParam::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PreloadCollectionParam_milvus_2eproto.base);
collection_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
PreloadCollectionParam::~PreloadCollectionParam() {
// @@protoc_insertion_point(destructor:milvus.grpc.PreloadCollectionParam)
SharedDtor();
}
void PreloadCollectionParam::SharedDtor() {
collection_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void PreloadCollectionParam::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const PreloadCollectionParam& PreloadCollectionParam::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PreloadCollectionParam_milvus_2eproto.base);
return *internal_default_instance();
}
void PreloadCollectionParam::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.grpc.PreloadCollectionParam)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
partition_tag_array_.Clear();
collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* PreloadCollectionParam::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// string collection_name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_collection_name(), ptr, ctx, "milvus.grpc.PreloadCollectionParam.collection_name");
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated string partition_tag_array = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_partition_tag_array(), ptr, ctx, "milvus.grpc.PreloadCollectionParam.partition_tag_array");
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool PreloadCollectionParam::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:milvus.grpc.PreloadCollectionParam)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string collection_name = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_collection_name()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->collection_name().data(), static_cast<int>(this->collection_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"milvus.grpc.PreloadCollectionParam.collection_name"));
} else {
goto handle_unusual;
}
break;
}
// repeated string partition_tag_array = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->add_partition_tag_array()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->partition_tag_array(this->partition_tag_array_size() - 1).data(),
static_cast<int>(this->partition_tag_array(this->partition_tag_array_size() - 1).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"milvus.grpc.PreloadCollectionParam.partition_tag_array"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:milvus.grpc.PreloadCollectionParam)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.grpc.PreloadCollectionParam)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void PreloadCollectionParam::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:milvus.grpc.PreloadCollectionParam)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string collection_name = 1;
if (this->collection_name().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->collection_name().data(), static_cast<int>(this->collection_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.grpc.PreloadCollectionParam.collection_name");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->collection_name(), output);
}
// repeated string partition_tag_array = 2;
for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->partition_tag_array(i).data(), static_cast<int>(this->partition_tag_array(i).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.grpc.PreloadCollectionParam.partition_tag_array");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
2, this->partition_tag_array(i), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:milvus.grpc.PreloadCollectionParam)
}
::PROTOBUF_NAMESPACE_ID::uint8* PreloadCollectionParam::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.grpc.PreloadCollectionParam)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string collection_name = 1;
if (this->collection_name().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->collection_name().data(), static_cast<int>(this->collection_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.grpc.PreloadCollectionParam.collection_name");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1, this->collection_name(), target);
}
// repeated string partition_tag_array = 2;
for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->partition_tag_array(i).data(), static_cast<int>(this->partition_tag_array(i).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.grpc.PreloadCollectionParam.partition_tag_array");
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
WriteStringToArray(2, this->partition_tag_array(i), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:milvus.grpc.PreloadCollectionParam)
return target;
}
size_t PreloadCollectionParam::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.grpc.PreloadCollectionParam)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string partition_tag_array = 2;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->partition_tag_array_size());
for (int i = 0, n = this->partition_tag_array_size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->partition_tag_array(i));
}
// string collection_name = 1;
if (this->collection_name().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->collection_name());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void PreloadCollectionParam::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:milvus.grpc.PreloadCollectionParam)
GOOGLE_DCHECK_NE(&from, this);
const PreloadCollectionParam* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<PreloadCollectionParam>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.grpc.PreloadCollectionParam)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.grpc.PreloadCollectionParam)
MergeFrom(*source);
}
}
void PreloadCollectionParam::MergeFrom(const PreloadCollectionParam& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.grpc.PreloadCollectionParam)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
partition_tag_array_.MergeFrom(from.partition_tag_array_);
if (from.collection_name().size() > 0) {
collection_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_name_);
}
}
void PreloadCollectionParam::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:milvus.grpc.PreloadCollectionParam)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void PreloadCollectionParam::CopyFrom(const PreloadCollectionParam& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.grpc.PreloadCollectionParam)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PreloadCollectionParam::IsInitialized() const {
return true;
}
void PreloadCollectionParam::InternalSwap(PreloadCollectionParam* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
partition_tag_array_.InternalSwap(CastToBase(&other->partition_tag_array_));
collection_name_.Swap(&other->collection_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
}
::PROTOBUF_NAMESPACE_ID::Metadata PreloadCollectionParam::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void ReLoadSegmentsParam::InitAsDefaultInstance() {
@ -20372,6 +20731,9 @@ template<> PROTOBUF_NOINLINE ::milvus::grpc::SearchInFilesParam* Arena::CreateMa
template<> PROTOBUF_NOINLINE ::milvus::grpc::SearchByIDParam* Arena::CreateMaybeMessage< ::milvus::grpc::SearchByIDParam >(Arena* arena) {
return Arena::CreateInternal< ::milvus::grpc::SearchByIDParam >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::grpc::PreloadCollectionParam* Arena::CreateMaybeMessage< ::milvus::grpc::PreloadCollectionParam >(Arena* arena) {
return Arena::CreateInternal< ::milvus::grpc::PreloadCollectionParam >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::grpc::ReLoadSegmentsParam* Arena::CreateMaybeMessage< ::milvus::grpc::ReLoadSegmentsParam >(Arena* arena) {
return Arena::CreateInternal< ::milvus::grpc::ReLoadSegmentsParam >(arena);
}

View File

@ -49,7 +49,7 @@ struct TableStruct_milvus_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[49]
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[50]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@ -160,6 +160,9 @@ extern PartitionListDefaultTypeInternal _PartitionList_default_instance_;
class PartitionParam;
class PartitionParamDefaultTypeInternal;
extern PartitionParamDefaultTypeInternal _PartitionParam_default_instance_;
class PreloadCollectionParam;
class PreloadCollectionParamDefaultTypeInternal;
extern PreloadCollectionParamDefaultTypeInternal _PreloadCollectionParam_default_instance_;
class RangeQuery;
class RangeQueryDefaultTypeInternal;
extern RangeQueryDefaultTypeInternal _RangeQuery_default_instance_;
@ -242,6 +245,7 @@ template<> ::milvus::grpc::Mapping* Arena::CreateMaybeMessage<::milvus::grpc::Ma
template<> ::milvus::grpc::MappingList* Arena::CreateMaybeMessage<::milvus::grpc::MappingList>(Arena*);
template<> ::milvus::grpc::PartitionList* Arena::CreateMaybeMessage<::milvus::grpc::PartitionList>(Arena*);
template<> ::milvus::grpc::PartitionParam* Arena::CreateMaybeMessage<::milvus::grpc::PartitionParam>(Arena*);
template<> ::milvus::grpc::PreloadCollectionParam* Arena::CreateMaybeMessage<::milvus::grpc::PreloadCollectionParam>(Arena*);
template<> ::milvus::grpc::RangeQuery* Arena::CreateMaybeMessage<::milvus::grpc::RangeQuery>(Arena*);
template<> ::milvus::grpc::ReLoadSegmentsParam* Arena::CreateMaybeMessage<::milvus::grpc::ReLoadSegmentsParam>(Arena*);
template<> ::milvus::grpc::RowRecord* Arena::CreateMaybeMessage<::milvus::grpc::RowRecord>(Arena*);
@ -2298,6 +2302,162 @@ class SearchByIDParam :
};
// -------------------------------------------------------------------
class PreloadCollectionParam :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.PreloadCollectionParam) */ {
public:
PreloadCollectionParam();
virtual ~PreloadCollectionParam();
PreloadCollectionParam(const PreloadCollectionParam& from);
PreloadCollectionParam(PreloadCollectionParam&& from) noexcept
: PreloadCollectionParam() {
*this = ::std::move(from);
}
inline PreloadCollectionParam& operator=(const PreloadCollectionParam& from) {
CopyFrom(from);
return *this;
}
inline PreloadCollectionParam& operator=(PreloadCollectionParam&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const PreloadCollectionParam& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const PreloadCollectionParam* internal_default_instance() {
return reinterpret_cast<const PreloadCollectionParam*>(
&_PreloadCollectionParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
12;
friend void swap(PreloadCollectionParam& a, PreloadCollectionParam& b) {
a.Swap(&b);
}
inline void Swap(PreloadCollectionParam* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline PreloadCollectionParam* New() const final {
return CreateMaybeMessage<PreloadCollectionParam>(nullptr);
}
PreloadCollectionParam* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<PreloadCollectionParam>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const PreloadCollectionParam& from);
void MergeFrom(const PreloadCollectionParam& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
#else
bool MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(PreloadCollectionParam* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.grpc.PreloadCollectionParam";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_milvus_2eproto);
return ::descriptor_table_milvus_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kPartitionTagArrayFieldNumber = 2,
kCollectionNameFieldNumber = 1,
};
// repeated string partition_tag_array = 2;
int partition_tag_array_size() const;
void clear_partition_tag_array();
const std::string& partition_tag_array(int index) const;
std::string* mutable_partition_tag_array(int index);
void set_partition_tag_array(int index, const std::string& value);
void set_partition_tag_array(int index, std::string&& value);
void set_partition_tag_array(int index, const char* value);
void set_partition_tag_array(int index, const char* value, size_t size);
std::string* add_partition_tag_array();
void add_partition_tag_array(const std::string& value);
void add_partition_tag_array(std::string&& value);
void add_partition_tag_array(const char* value);
void add_partition_tag_array(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& partition_tag_array() const;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_partition_tag_array();
// string collection_name = 1;
void clear_collection_name();
const std::string& collection_name() const;
void set_collection_name(const std::string& value);
void set_collection_name(std::string&& value);
void set_collection_name(const char* value);
void set_collection_name(const char* value, size_t size);
std::string* mutable_collection_name();
std::string* release_collection_name();
void set_allocated_collection_name(std::string* collection_name);
// @@protoc_insertion_point(class_scope:milvus.grpc.PreloadCollectionParam)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> partition_tag_array_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr collection_name_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_milvus_2eproto;
};
// -------------------------------------------------------------------
class ReLoadSegmentsParam :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.grpc.ReLoadSegmentsParam) */ {
public:
@ -2340,7 +2500,7 @@ class ReLoadSegmentsParam :
&_ReLoadSegmentsParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
12;
13;
friend void swap(ReLoadSegmentsParam& a, ReLoadSegmentsParam& b) {
a.Swap(&b);
@ -2496,7 +2656,7 @@ class TopKQueryResult :
&_TopKQueryResult_default_instance_);
}
static constexpr int kIndexInFileMessages =
13;
14;
friend void swap(TopKQueryResult& a, TopKQueryResult& b) {
a.Swap(&b);
@ -2665,7 +2825,7 @@ class StringReply :
&_StringReply_default_instance_);
}
static constexpr int kIndexInFileMessages =
14;
15;
friend void swap(StringReply& a, StringReply& b) {
a.Swap(&b);
@ -2812,7 +2972,7 @@ class BoolReply :
&_BoolReply_default_instance_);
}
static constexpr int kIndexInFileMessages =
15;
16;
friend void swap(BoolReply& a, BoolReply& b) {
a.Swap(&b);
@ -2953,7 +3113,7 @@ class CollectionRowCount :
&_CollectionRowCount_default_instance_);
}
static constexpr int kIndexInFileMessages =
16;
17;
friend void swap(CollectionRowCount& a, CollectionRowCount& b) {
a.Swap(&b);
@ -3094,7 +3254,7 @@ class Command :
&_Command_default_instance_);
}
static constexpr int kIndexInFileMessages =
17;
18;
friend void swap(Command& a, Command& b) {
a.Swap(&b);
@ -3231,7 +3391,7 @@ class IndexParam :
&_IndexParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
18;
19;
friend void swap(IndexParam& a, IndexParam& b) {
a.Swap(&b);
@ -3398,7 +3558,7 @@ class FlushParam :
&_FlushParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
19;
20;
friend void swap(FlushParam& a, FlushParam& b) {
a.Swap(&b);
@ -3541,7 +3701,7 @@ class DeleteByIDParam :
&_DeleteByIDParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
20;
21;
friend void swap(DeleteByIDParam& a, DeleteByIDParam& b) {
a.Swap(&b);
@ -3692,7 +3852,7 @@ class CollectionInfo :
&_CollectionInfo_default_instance_);
}
static constexpr int kIndexInFileMessages =
21;
22;
friend void swap(CollectionInfo& a, CollectionInfo& b) {
a.Swap(&b);
@ -3839,7 +3999,7 @@ class VectorsIdentity :
&_VectorsIdentity_default_instance_);
}
static constexpr int kIndexInFileMessages =
22;
23;
friend void swap(VectorsIdentity& a, VectorsIdentity& b) {
a.Swap(&b);
@ -3990,7 +4150,7 @@ class VectorsData :
&_VectorsData_default_instance_);
}
static constexpr int kIndexInFileMessages =
23;
24;
friend void swap(VectorsData& a, VectorsData& b) {
a.Swap(&b);
@ -4137,7 +4297,7 @@ class GetVectorIDsParam :
&_GetVectorIDsParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
24;
25;
friend void swap(GetVectorIDsParam& a, GetVectorIDsParam& b) {
a.Swap(&b);
@ -4287,7 +4447,7 @@ class VectorFieldParam :
&_VectorFieldParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
25;
26;
friend void swap(VectorFieldParam& a, VectorFieldParam& b) {
a.Swap(&b);
@ -4424,7 +4584,7 @@ class FieldType :
&_FieldType_default_instance_);
}
static constexpr int kIndexInFileMessages =
26;
27;
friend void swap(FieldType& a, FieldType& b) {
a.Swap(&b);
@ -4580,7 +4740,7 @@ class FieldParam :
&_FieldParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
27;
28;
friend void swap(FieldParam& a, FieldParam& b) {
a.Swap(&b);
@ -4747,7 +4907,7 @@ class VectorFieldValue :
&_VectorFieldValue_default_instance_);
}
static constexpr int kIndexInFileMessages =
28;
29;
friend void swap(VectorFieldValue& a, VectorFieldValue& b) {
a.Swap(&b);
@ -4895,7 +5055,7 @@ class FieldValue :
&_FieldValue_default_instance_);
}
static constexpr int kIndexInFileMessages =
29;
30;
friend void swap(FieldValue& a, FieldValue& b) {
a.Swap(&b);
@ -5112,7 +5272,7 @@ class Mapping :
&_Mapping_default_instance_);
}
static constexpr int kIndexInFileMessages =
30;
31;
friend void swap(Mapping& a, Mapping& b) {
a.Swap(&b);
@ -5279,7 +5439,7 @@ class MappingList :
&_MappingList_default_instance_);
}
static constexpr int kIndexInFileMessages =
31;
32;
friend void swap(MappingList& a, MappingList& b) {
a.Swap(&b);
@ -5426,7 +5586,7 @@ class TermQuery :
&_TermQuery_default_instance_);
}
static constexpr int kIndexInFileMessages =
32;
33;
friend void swap(TermQuery& a, TermQuery& b) {
a.Swap(&b);
@ -5603,7 +5763,7 @@ class CompareExpr :
&_CompareExpr_default_instance_);
}
static constexpr int kIndexInFileMessages =
33;
34;
friend void swap(CompareExpr& a, CompareExpr& b) {
a.Swap(&b);
@ -5747,7 +5907,7 @@ class RangeQuery :
&_RangeQuery_default_instance_);
}
static constexpr int kIndexInFileMessages =
34;
35;
friend void swap(RangeQuery& a, RangeQuery& b) {
a.Swap(&b);
@ -5917,7 +6077,7 @@ class VectorQuery :
&_VectorQuery_default_instance_);
}
static constexpr int kIndexInFileMessages =
35;
36;
friend void swap(VectorQuery& a, VectorQuery& b) {
a.Swap(&b);
@ -6094,7 +6254,7 @@ class BooleanQuery :
&_BooleanQuery_default_instance_);
}
static constexpr int kIndexInFileMessages =
36;
37;
friend void swap(BooleanQuery& a, BooleanQuery& b) {
a.Swap(&b);
@ -6246,7 +6406,7 @@ class GeneralQuery :
&_GeneralQuery_default_instance_);
}
static constexpr int kIndexInFileMessages =
37;
38;
friend void swap(GeneralQuery& a, GeneralQuery& b) {
a.Swap(&b);
@ -6424,7 +6584,7 @@ class HSearchParam :
&_HSearchParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
38;
39;
friend void swap(HSearchParam& a, HSearchParam& b) {
a.Swap(&b);
@ -6603,7 +6763,7 @@ class HSearchInSegmentsParam :
&_HSearchInSegmentsParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
39;
40;
friend void swap(HSearchInSegmentsParam& a, HSearchInSegmentsParam& b) {
a.Swap(&b);
@ -6756,7 +6916,7 @@ class AttrRecord :
&_AttrRecord_default_instance_);
}
static constexpr int kIndexInFileMessages =
40;
41;
friend void swap(AttrRecord& a, AttrRecord& b) {
a.Swap(&b);
@ -6899,7 +7059,7 @@ class HEntity :
&_HEntity_default_instance_);
}
static constexpr int kIndexInFileMessages =
41;
42;
friend void swap(HEntity& a, HEntity& b) {
a.Swap(&b);
@ -7092,7 +7252,7 @@ class HQueryResult :
&_HQueryResult_default_instance_);
}
static constexpr int kIndexInFileMessages =
42;
43;
friend void swap(HQueryResult& a, HQueryResult& b) {
a.Swap(&b);
@ -7274,7 +7434,7 @@ class HInsertParam :
&_HInsertParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
43;
44;
friend void swap(HInsertParam& a, HInsertParam& b) {
a.Swap(&b);
@ -7461,7 +7621,7 @@ class HEntityIdentity :
&_HEntityIdentity_default_instance_);
}
static constexpr int kIndexInFileMessages =
44;
45;
friend void swap(HEntityIdentity& a, HEntityIdentity& b) {
a.Swap(&b);
@ -7605,7 +7765,7 @@ class HEntityIDs :
&_HEntityIDs_default_instance_);
}
static constexpr int kIndexInFileMessages =
45;
46;
friend void swap(HEntityIDs& a, HEntityIDs& b) {
a.Swap(&b);
@ -7753,7 +7913,7 @@ class HGetEntityIDsParam :
&_HGetEntityIDsParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
46;
47;
friend void swap(HGetEntityIDsParam& a, HGetEntityIDsParam& b) {
a.Swap(&b);
@ -7903,7 +8063,7 @@ class HDeleteByIDParam :
&_HDeleteByIDParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
47;
48;
friend void swap(HDeleteByIDParam& a, HDeleteByIDParam& b) {
a.Swap(&b);
@ -8054,7 +8214,7 @@ class HIndexParam :
&_HIndexParam_default_instance_);
}
static constexpr int kIndexInFileMessages =
48;
49;
friend void swap(HIndexParam& a, HIndexParam& b) {
a.Swap(&b);
@ -9721,6 +9881,126 @@ SearchByIDParam::extra_params() const {
// -------------------------------------------------------------------
// PreloadCollectionParam
// string collection_name = 1;
inline void PreloadCollectionParam::clear_collection_name() {
collection_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& PreloadCollectionParam::collection_name() const {
// @@protoc_insertion_point(field_get:milvus.grpc.PreloadCollectionParam.collection_name)
return collection_name_.GetNoArena();
}
inline void PreloadCollectionParam::set_collection_name(const std::string& value) {
collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:milvus.grpc.PreloadCollectionParam.collection_name)
}
inline void PreloadCollectionParam::set_collection_name(std::string&& value) {
collection_name_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:milvus.grpc.PreloadCollectionParam.collection_name)
}
inline void PreloadCollectionParam::set_collection_name(const char* value) {
GOOGLE_DCHECK(value != nullptr);
collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:milvus.grpc.PreloadCollectionParam.collection_name)
}
inline void PreloadCollectionParam::set_collection_name(const char* value, size_t size) {
collection_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.PreloadCollectionParam.collection_name)
}
inline std::string* PreloadCollectionParam::mutable_collection_name() {
// @@protoc_insertion_point(field_mutable:milvus.grpc.PreloadCollectionParam.collection_name)
return collection_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* PreloadCollectionParam::release_collection_name() {
// @@protoc_insertion_point(field_release:milvus.grpc.PreloadCollectionParam.collection_name)
return collection_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void PreloadCollectionParam::set_allocated_collection_name(std::string* collection_name) {
if (collection_name != nullptr) {
} else {
}
collection_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), collection_name);
// @@protoc_insertion_point(field_set_allocated:milvus.grpc.PreloadCollectionParam.collection_name)
}
// repeated string partition_tag_array = 2;
inline int PreloadCollectionParam::partition_tag_array_size() const {
return partition_tag_array_.size();
}
inline void PreloadCollectionParam::clear_partition_tag_array() {
partition_tag_array_.Clear();
}
inline const std::string& PreloadCollectionParam::partition_tag_array(int index) const {
// @@protoc_insertion_point(field_get:milvus.grpc.PreloadCollectionParam.partition_tag_array)
return partition_tag_array_.Get(index);
}
inline std::string* PreloadCollectionParam::mutable_partition_tag_array(int index) {
// @@protoc_insertion_point(field_mutable:milvus.grpc.PreloadCollectionParam.partition_tag_array)
return partition_tag_array_.Mutable(index);
}
inline void PreloadCollectionParam::set_partition_tag_array(int index, const std::string& value) {
// @@protoc_insertion_point(field_set:milvus.grpc.PreloadCollectionParam.partition_tag_array)
partition_tag_array_.Mutable(index)->assign(value);
}
inline void PreloadCollectionParam::set_partition_tag_array(int index, std::string&& value) {
// @@protoc_insertion_point(field_set:milvus.grpc.PreloadCollectionParam.partition_tag_array)
partition_tag_array_.Mutable(index)->assign(std::move(value));
}
inline void PreloadCollectionParam::set_partition_tag_array(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
partition_tag_array_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:milvus.grpc.PreloadCollectionParam.partition_tag_array)
}
inline void PreloadCollectionParam::set_partition_tag_array(int index, const char* value, size_t size) {
partition_tag_array_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:milvus.grpc.PreloadCollectionParam.partition_tag_array)
}
inline std::string* PreloadCollectionParam::add_partition_tag_array() {
// @@protoc_insertion_point(field_add_mutable:milvus.grpc.PreloadCollectionParam.partition_tag_array)
return partition_tag_array_.Add();
}
inline void PreloadCollectionParam::add_partition_tag_array(const std::string& value) {
partition_tag_array_.Add()->assign(value);
// @@protoc_insertion_point(field_add:milvus.grpc.PreloadCollectionParam.partition_tag_array)
}
inline void PreloadCollectionParam::add_partition_tag_array(std::string&& value) {
partition_tag_array_.Add(std::move(value));
// @@protoc_insertion_point(field_add:milvus.grpc.PreloadCollectionParam.partition_tag_array)
}
inline void PreloadCollectionParam::add_partition_tag_array(const char* value) {
GOOGLE_DCHECK(value != nullptr);
partition_tag_array_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:milvus.grpc.PreloadCollectionParam.partition_tag_array)
}
inline void PreloadCollectionParam::add_partition_tag_array(const char* value, size_t size) {
partition_tag_array_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:milvus.grpc.PreloadCollectionParam.partition_tag_array)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
PreloadCollectionParam::partition_tag_array() const {
// @@protoc_insertion_point(field_list:milvus.grpc.PreloadCollectionParam.partition_tag_array)
return partition_tag_array_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
PreloadCollectionParam::mutable_partition_tag_array() {
// @@protoc_insertion_point(field_mutable_list:milvus.grpc.PreloadCollectionParam.partition_tag_array)
return &partition_tag_array_;
}
// -------------------------------------------------------------------
// ReLoadSegmentsParam
// string collection_name = 1;
@ -14003,6 +14283,8 @@ HIndexParam::extra_params() const {
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)

View File

@ -113,6 +113,14 @@ message SearchByIDParam {
repeated KeyValuePair extra_params = 5;
}
/**
* @brief Params for preload collection/partitions
*/
message PreloadCollectionParam {
string collection_name = 1;
repeated string partition_tag_array = 2;
}
/**
* @brief Params for reloading segments
*/
@ -624,13 +632,13 @@ service MilvusService {
rpc DeleteByID(DeleteByIDParam) returns (Status) {}
/**
* @brief This method is used to preload collection
* @brief This method is used to preload collection/partitions
*
* @param CollectionName, target collection name.
* @param PreloadCollectionParam, target collection/partitions.
*
* @return Status
*/
rpc PreloadCollection(CollectionName) returns (Status) {}
rpc PreloadCollection(PreloadCollectionParam) returns (Status) {}
/**
* @brief This method is used to reload collection segments

View File

@ -272,8 +272,9 @@ DBWrapper::PreloadCollections(const std::string& preload_collections) {
std::vector<engine::meta::CollectionSchema> table_schema_array;
db_->AllCollections(table_schema_array);
std::vector<std::string> partition_tags;
for (auto& schema : table_schema_array) {
auto status = db_->PreloadCollection(nullptr, schema.collection_id_);
auto status = db_->PreloadCollection(nullptr, schema.collection_id_, partition_tags);
if (!status.ok()) {
return status;
}
@ -281,8 +282,10 @@ DBWrapper::PreloadCollections(const std::string& preload_collections) {
} else {
std::vector<std::string> collection_names;
StringHelpFunctions::SplitStringByDelimeter(preload_collections, ",", collection_names);
std::vector<std::string> partition_tags;
for (auto& name : collection_names) {
auto status = db_->PreloadCollection(nullptr, name);
auto status = db_->PreloadCollection(nullptr, name, partition_tags);
if (!status.ok()) {
return status;
}

View File

@ -188,8 +188,9 @@ RequestHandler::DeleteByID(const std::shared_ptr<Context>& context, const std::s
}
Status
RequestHandler::PreloadCollection(const std::shared_ptr<Context>& context, const std::string& collection_name) {
BaseRequestPtr request_ptr = PreloadCollectionRequest::Create(context, collection_name);
RequestHandler::PreloadCollection(const std::shared_ptr<Context>& context, const std::string& collection_name,
const std::vector<std::string>& partition_tags) {
BaseRequestPtr request_ptr = PreloadCollectionRequest::Create(context, collection_name, partition_tags);
RequestScheduler::ExecRequest(request_ptr);
return request_ptr->status();

View File

@ -88,7 +88,8 @@ class RequestHandler {
const std::vector<int64_t>& vector_ids);
Status
PreloadCollection(const std::shared_ptr<Context>& context, const std::string& collection_name);
PreloadCollection(const std::shared_ptr<Context>& context, const std::string& collection_name,
const std::vector<std::string>& partition_tags);
Status
ReLoadSegments(const std::shared_ptr<Context>& context, const std::string& collection_name,

View File

@ -22,14 +22,17 @@ namespace milvus {
namespace server {
PreloadCollectionRequest::PreloadCollectionRequest(const std::shared_ptr<milvus::server::Context>& context,
const std::string& collection_name)
: BaseRequest(context, BaseRequest::kPreloadCollection), collection_name_(collection_name) {
const std::string& collection_name,
const std::vector<std::string>& partition_tags)
: BaseRequest(context, BaseRequest::kPreloadCollection),
collection_name_(collection_name),
partition_tags_(partition_tags) {
}
BaseRequestPtr
PreloadCollectionRequest::Create(const std::shared_ptr<milvus::server::Context>& context,
const std::string& collection_name) {
return std::shared_ptr<BaseRequest>(new PreloadCollectionRequest(context, collection_name));
const std::string& collection_name, const std::vector<std::string>& partition_tags) {
return std::shared_ptr<BaseRequest>(new PreloadCollectionRequest(context, collection_name, partition_tags));
}
Status
@ -62,7 +65,7 @@ PreloadCollectionRequest::OnExecute() {
// step 2: force load collection data into cache
// load each segment and insert into cache even cache capacity is not enough
status = DBWrapper::DB()->PreloadCollection(context_, collection_name_, true);
status = DBWrapper::DB()->PreloadCollection(context_, collection_name_, partition_tags_, true);
fiu_do_on("PreloadCollectionRequest.OnExecute.preload_collection_fail",
status = Status(milvus::SERVER_UNEXPECTED_ERROR, ""));
fiu_do_on("PreloadCollectionRequest.OnExecute.throw_std_exception", throw std::exception());

View File

@ -15,6 +15,7 @@
#include <memory>
#include <string>
#include <vector>
namespace milvus {
namespace server {
@ -22,17 +23,19 @@ namespace server {
class PreloadCollectionRequest : public BaseRequest {
public:
static BaseRequestPtr
Create(const std::shared_ptr<milvus::server::Context>& context, const std::string& collection_name);
Create(const std::shared_ptr<milvus::server::Context>& context, const std::string& collection_name,
const std::vector<std::string>& partition_tags);
protected:
PreloadCollectionRequest(const std::shared_ptr<milvus::server::Context>& context,
const std::string& collection_name);
const std::string& collection_name, const std::vector<std::string>& partition_tags);
Status
OnExecute() override;
private:
const std::string collection_name_;
const std::vector<std::string>& partition_tags_;
};
} // namespace server

View File

@ -747,12 +747,18 @@ GrpcRequestHandler::DeleteByID(::grpc::ServerContext* context, const ::milvus::g
}
::grpc::Status
GrpcRequestHandler::PreloadCollection(::grpc::ServerContext* context, const ::milvus::grpc::CollectionName* request,
GrpcRequestHandler::PreloadCollection(::grpc::ServerContext* context,
const ::milvus::grpc::PreloadCollectionParam* request,
::milvus::grpc::Status* response) {
CHECK_NULLPTR_RETURN(request);
LOG_SERVER_INFO_ << LogOut("Request [%s] %s begin.", GetContext(context)->RequestID().c_str(), __func__);
Status status = request_handler_.PreloadCollection(GetContext(context), request->collection_name());
std::vector<std::string> partition_tags;
for (int i = 0; i < request->partition_tag_array_size(); i++) {
partition_tags.push_back(request->partition_tag_array(i));
}
Status status = request_handler_.PreloadCollection(GetContext(context), request->collection_name(), partition_tags);
LOG_SERVER_INFO_ << LogOut("Request [%s] %s end.", GetContext(context)->RequestID().c_str(), __func__);
SET_RESPONSE(response, status, context);

View File

@ -294,7 +294,7 @@ class GrpcRequestHandler final : public ::milvus::grpc::MilvusService::Service,
//
// @return Status
::grpc::Status
PreloadCollection(::grpc::ServerContext* context, const ::milvus::grpc::CollectionName* request,
PreloadCollection(::grpc::ServerContext* context, const ::milvus::grpc::PreloadCollectionParam* request,
::milvus::grpc::Status* response) override;
// *

View File

@ -259,7 +259,9 @@ WebRequestHandler::PreLoadCollection(const nlohmann::json& json, std::string& re
}
auto collection_name = json["collection_name"];
auto status = request_handler_.PreloadCollection(context_ptr_, collection_name.get<std::string>());
std::vector<std::string> partition_tags;
// TODO: set partition_tags
auto status = request_handler_.PreloadCollection(context_ptr_, collection_name.get<std::string>(), partition_tags);
if (status.ok()) {
nlohmann::json result;
AddStatusToJson(result, status.code(), status.message());

View File

@ -434,19 +434,24 @@ TEST_F(DBTest, PRELOAD_TEST) {
milvus::engine::meta::CollectionSchema collection_info = BuildCollectionSchema();
auto stat = db_->CreateCollection(collection_info);
std::string partition_tag = "part_1";
stat = db_->CreatePartition(collection_info.collection_id_, "", partition_tag);
milvus::engine::meta::CollectionSchema collection_info_get;
collection_info_get.collection_id_ = COLLECTION_NAME;
stat = db_->DescribeCollection(collection_info_get);
ASSERT_TRUE(stat.ok());
ASSERT_EQ(collection_info_get.dimension_, COLLECTION_DIM);
// insert 5000 rows to partition, insert 20000 rows to collection
int loop = 5;
for (auto i = 0; i < loop; ++i) {
uint64_t nb = VECTOR_COUNT;
milvus::engine::VectorsData xb;
BuildVectors(nb, i, xb);
db_->InsertVectors(COLLECTION_NAME, "", xb);
std::string tag = (i == 0) ? partition_tag : "";
db_->InsertVectors(COLLECTION_NAME, tag, xb);
ASSERT_EQ(xb.id_array_.size(), nb);
}
@ -454,35 +459,56 @@ TEST_F(DBTest, PRELOAD_TEST) {
index.engine_type_ = (int)milvus::engine::EngineType::FAISS_IDMAP;
db_->CreateIndex(dummy_context_, COLLECTION_NAME, index); // wait until build index finish
// test load one partition data
int64_t prev_cache_usage = milvus::cache::CpuCacheMgr::GetInstance()->CacheUsage();
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME);
std::vector<std::string> partition_tags = {partition_tag};
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_TRUE(stat.ok());
int64_t cur_cache_usage = milvus::cache::CpuCacheMgr::GetInstance()->CacheUsage();
ASSERT_TRUE(prev_cache_usage < cur_cache_usage);
int64_t gap = milvus::cache::CpuCacheMgr::GetInstance()->CacheUsage() - prev_cache_usage;
int64_t data_size = VECTOR_COUNT*(COLLECTION_DIM*sizeof(float) + sizeof(int64_t));
ASSERT_EQ(gap, data_size);
// test load whole collection data
prev_cache_usage = milvus::cache::CpuCacheMgr::GetInstance()->CacheUsage();
partition_tags.clear();
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_TRUE(stat.ok());
gap = milvus::cache::CpuCacheMgr::GetInstance()->CacheUsage() - prev_cache_usage;
data_size = VECTOR_COUNT*(COLLECTION_DIM*sizeof(float) + sizeof(int64_t))*4;
ASSERT_EQ(gap, data_size);
milvus::cache::CpuCacheMgr::GetInstance()->ClearCache();
// test regular match patition tag
partition_tags = {"part_\\d{1}"};
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_TRUE(stat.ok());
gap = milvus::cache::CpuCacheMgr::GetInstance()->CacheUsage();
data_size = VECTOR_COUNT*(COLLECTION_DIM*sizeof(float) + sizeof(int64_t));
ASSERT_EQ(gap, data_size);
FIU_ENABLE_FIU("SqliteMetaImpl.FilesToSearch.throw_exception");
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME);
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_FALSE(stat.ok());
fiu_disable("SqliteMetaImpl.FilesToSearch.throw_exception");
// create a partition
stat = db_->CreatePartition(COLLECTION_NAME, "part0", "0");
ASSERT_TRUE(stat.ok());
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME);
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_TRUE(stat.ok());
FIU_ENABLE_FIU("DBImpl.PreloadCollection.null_engine");
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME);
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_FALSE(stat.ok());
fiu_disable("DBImpl.PreloadCollection.null_engine");
FIU_ENABLE_FIU("DBImpl.PreloadCollection.exceed_cache");
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME);
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_FALSE(stat.ok());
fiu_disable("DBImpl.PreloadCollection.exceed_cache");
FIU_ENABLE_FIU("DBImpl.PreloadCollection.engine_throw_exception");
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME);
stat = db_->PreloadCollection(dummy_context_, COLLECTION_NAME, partition_tags);
ASSERT_FALSE(stat.ok());
fiu_disable("DBImpl.PreloadCollection.engine_throw_exception");
}
@ -543,7 +569,8 @@ TEST_F(DBTest, SHUTDOWN_TEST) {
stat = db_->GetVectorsByID(collection_info, id_array, vectors);
ASSERT_FALSE(stat.ok());
stat = db_->PreloadCollection(dummy_context_, collection_info.collection_id_);
std::vector<std::string> partition_tags;
stat = db_->PreloadCollection(dummy_context_, collection_info.collection_id_, partition_tags);
ASSERT_FALSE(stat.ok());
uint64_t row_count = 0;

View File

@ -748,19 +748,20 @@ TEST_F(RpcHandlerTest, TABLES_TEST) {
// Preload Collection
{
::milvus::grpc::CollectionSchema collection_schema;
::milvus::grpc::PreloadCollectionParam preload_param;
grpc_collection_name.Clear();
auto status = handler->PreloadCollection(&context, &grpc_collection_name, &response);
auto status = handler->PreloadCollection(&context, &preload_param, &response);
grpc_collection_name.set_collection_name(COLLECTION_NAME);
status = handler->PreloadCollection(&context, &grpc_collection_name, &response);
status = handler->PreloadCollection(&context, &preload_param, &response);
ASSERT_EQ(status.error_code(), ::grpc::Status::OK.error_code());
fiu_enable("PreloadCollectionRequest.OnExecute.preload_collection_fail", 1, NULL, 0);
handler->PreloadCollection(&context, &grpc_collection_name, &response);
handler->PreloadCollection(&context, &preload_param, &response);
fiu_disable("PreloadCollectionRequest.OnExecute.preload_collection_fail");
fiu_enable("PreloadCollectionRequest.OnExecute.throw_std_exception", 1, NULL, 0);
handler->PreloadCollection(&context, &grpc_collection_name, &response);
handler->PreloadCollection(&context, &preload_param, &response);
fiu_disable("PreloadCollectionRequest.OnExecute.throw_std_exception");
fiu_init(0);