Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ Please mark all change in change log and use the ticket from JIRA. - \#602 - Optimizer specify wrong gpu_id - \#606 - No log generated during building index with CPU - \#631 - FAISS isn't compiled with O3 option - \#649 - Typo "partiton" should be "partition" ## Feature - \#12 - Pure CPU version for Milvus Loading core/src/db/DB.h +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class DB { DropPartitionByTag(const std::string& table_id, const std::string& partition_tag) = 0; virtual Status ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partiton_schema_array) = 0; ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partition_schema_array) = 0; virtual Status InsertVectors(const std::string& table_id, const std::string& partition_tag, uint64_t n, const float* vectors, Loading core/src/db/DBImpl.cpp +26 −26 Original line number Diff line number Diff line Loading @@ -190,9 +190,9 @@ DBImpl::PreloadTable(const std::string& table_id) { } // step 2: get files from partition tables std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = GetFilesToSearch(schema.table_id_, ids, dates, files_array); } Loading Loading @@ -296,12 +296,12 @@ DBImpl::DropPartitionByTag(const std::string& table_id, const std::string& parti } Status DBImpl::ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partiton_schema_array) { DBImpl::ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partition_schema_array) { if (shutting_down_.load(std::memory_order_acquire)) { return SHUTDOWN_ERROR; } return meta_ptr_->ShowPartitions(table_id, partiton_schema_array); return meta_ptr_->ShowPartitions(table_id, partition_schema_array); } Status Loading Loading @@ -427,9 +427,9 @@ DBImpl::Query(const std::string& table_id, const std::vector<std::string>& parti return status; } std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = GetFilesToSearch(schema.table_id_, ids, dates, files_array); } } else { Loading Loading @@ -917,15 +917,15 @@ DBImpl::GetFilesToSearch(const std::string& table_id, const std::vector<size_t>& Status DBImpl::GetPartitionsByTags(const std::string& table_id, const std::vector<std::string>& partition_tags, std::set<std::string>& partition_name_array) { std::vector<meta::TableSchema> partiton_array; auto status = meta_ptr_->ShowPartitions(table_id, partiton_array); std::vector<meta::TableSchema> partition_array; auto status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& tag : partition_tags) { // trim side-blank of tag, only compare valid characters // for example: " ab cd " is treated as "ab cd" std::string valid_tag = tag; server::StringHelpFunctions::TrimStringBlank(valid_tag); for (auto& schema : partiton_array) { for (auto& schema : partition_array) { if (server::StringHelpFunctions::IsRegexMatch(schema.partition_tag_, valid_tag)) { partition_name_array.insert(schema.table_id_); } Loading Loading @@ -955,9 +955,9 @@ DBImpl::DropTableRecursively(const std::string& table_id, const meta::DatesT& da status = meta_ptr_->DropDataByDate(table_id, dates); } std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = DropTableRecursively(schema.table_id_, dates); if (!status.ok()) { return status; Loading @@ -977,9 +977,9 @@ DBImpl::UpdateTableIndexRecursively(const std::string& table_id, const TableInde return status; } std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = UpdateTableIndexRecursively(schema.table_id_, index); if (!status.ok()) { return status; Loading Loading @@ -1028,9 +1028,9 @@ DBImpl::BuildTableIndexRecursively(const std::string& table_id, const TableIndex } // build index for partition std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = BuildTableIndexRecursively(schema.table_id_, index); if (!status.ok()) { return status; Loading Loading @@ -1060,9 +1060,9 @@ DBImpl::DropTableIndexRecursively(const std::string& table_id) { } // drop partition index std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = DropTableIndexRecursively(schema.table_id_); if (!status.ok()) { return status; Loading @@ -1081,9 +1081,9 @@ DBImpl::GetTableRowCountRecursively(const std::string& table_id, uint64_t& row_c } // get partition row count std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { uint64_t partition_row_count = 0; status = GetTableRowCountRecursively(schema.table_id_, partition_row_count); if (!status.ok()) { Loading core/src/db/DBImpl.h +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class DBImpl : public DB { DropPartitionByTag(const std::string& table_id, const std::string& partition_tag) override; Status ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partiton_schema_array) override; ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partition_schema_array) override; Status InsertVectors(const std::string& table_id, const std::string& partition_tag, uint64_t n, const float* vectors, Loading core/src/db/meta/Meta.h +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ class Meta { DropPartition(const std::string& partition_name) = 0; virtual Status ShowPartitions(const std::string& table_name, std::vector<meta::TableSchema>& partiton_schema_array) = 0; ShowPartitions(const std::string& table_name, std::vector<meta::TableSchema>& partition_schema_array) = 0; virtual Status GetPartitionName(const std::string& table_name, const std::string& tag, std::string& partition_name) = 0; Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ Please mark all change in change log and use the ticket from JIRA. - \#602 - Optimizer specify wrong gpu_id - \#606 - No log generated during building index with CPU - \#631 - FAISS isn't compiled with O3 option - \#649 - Typo "partiton" should be "partition" ## Feature - \#12 - Pure CPU version for Milvus Loading
core/src/db/DB.h +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class DB { DropPartitionByTag(const std::string& table_id, const std::string& partition_tag) = 0; virtual Status ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partiton_schema_array) = 0; ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partition_schema_array) = 0; virtual Status InsertVectors(const std::string& table_id, const std::string& partition_tag, uint64_t n, const float* vectors, Loading
core/src/db/DBImpl.cpp +26 −26 Original line number Diff line number Diff line Loading @@ -190,9 +190,9 @@ DBImpl::PreloadTable(const std::string& table_id) { } // step 2: get files from partition tables std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = GetFilesToSearch(schema.table_id_, ids, dates, files_array); } Loading Loading @@ -296,12 +296,12 @@ DBImpl::DropPartitionByTag(const std::string& table_id, const std::string& parti } Status DBImpl::ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partiton_schema_array) { DBImpl::ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partition_schema_array) { if (shutting_down_.load(std::memory_order_acquire)) { return SHUTDOWN_ERROR; } return meta_ptr_->ShowPartitions(table_id, partiton_schema_array); return meta_ptr_->ShowPartitions(table_id, partition_schema_array); } Status Loading Loading @@ -427,9 +427,9 @@ DBImpl::Query(const std::string& table_id, const std::vector<std::string>& parti return status; } std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = GetFilesToSearch(schema.table_id_, ids, dates, files_array); } } else { Loading Loading @@ -917,15 +917,15 @@ DBImpl::GetFilesToSearch(const std::string& table_id, const std::vector<size_t>& Status DBImpl::GetPartitionsByTags(const std::string& table_id, const std::vector<std::string>& partition_tags, std::set<std::string>& partition_name_array) { std::vector<meta::TableSchema> partiton_array; auto status = meta_ptr_->ShowPartitions(table_id, partiton_array); std::vector<meta::TableSchema> partition_array; auto status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& tag : partition_tags) { // trim side-blank of tag, only compare valid characters // for example: " ab cd " is treated as "ab cd" std::string valid_tag = tag; server::StringHelpFunctions::TrimStringBlank(valid_tag); for (auto& schema : partiton_array) { for (auto& schema : partition_array) { if (server::StringHelpFunctions::IsRegexMatch(schema.partition_tag_, valid_tag)) { partition_name_array.insert(schema.table_id_); } Loading Loading @@ -955,9 +955,9 @@ DBImpl::DropTableRecursively(const std::string& table_id, const meta::DatesT& da status = meta_ptr_->DropDataByDate(table_id, dates); } std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = DropTableRecursively(schema.table_id_, dates); if (!status.ok()) { return status; Loading @@ -977,9 +977,9 @@ DBImpl::UpdateTableIndexRecursively(const std::string& table_id, const TableInde return status; } std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = UpdateTableIndexRecursively(schema.table_id_, index); if (!status.ok()) { return status; Loading Loading @@ -1028,9 +1028,9 @@ DBImpl::BuildTableIndexRecursively(const std::string& table_id, const TableIndex } // build index for partition std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = BuildTableIndexRecursively(schema.table_id_, index); if (!status.ok()) { return status; Loading Loading @@ -1060,9 +1060,9 @@ DBImpl::DropTableIndexRecursively(const std::string& table_id) { } // drop partition index std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { status = DropTableIndexRecursively(schema.table_id_); if (!status.ok()) { return status; Loading @@ -1081,9 +1081,9 @@ DBImpl::GetTableRowCountRecursively(const std::string& table_id, uint64_t& row_c } // get partition row count std::vector<meta::TableSchema> partiton_array; status = meta_ptr_->ShowPartitions(table_id, partiton_array); for (auto& schema : partiton_array) { std::vector<meta::TableSchema> partition_array; status = meta_ptr_->ShowPartitions(table_id, partition_array); for (auto& schema : partition_array) { uint64_t partition_row_count = 0; status = GetTableRowCountRecursively(schema.table_id_, partition_row_count); if (!status.ok()) { Loading
core/src/db/DBImpl.h +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ class DBImpl : public DB { DropPartitionByTag(const std::string& table_id, const std::string& partition_tag) override; Status ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partiton_schema_array) override; ShowPartitions(const std::string& table_id, std::vector<meta::TableSchema>& partition_schema_array) override; Status InsertVectors(const std::string& table_id, const std::string& partition_tag, uint64_t n, const float* vectors, Loading
core/src/db/meta/Meta.h +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ class Meta { DropPartition(const std::string& partition_name) = 0; virtual Status ShowPartitions(const std::string& table_name, std::vector<meta::TableSchema>& partiton_schema_array) = 0; ShowPartitions(const std::string& table_name, std::vector<meta::TableSchema>& partition_schema_array) = 0; virtual Status GetPartitionName(const std::string& table_name, const std::string& tag, std::string& partition_name) = 0; Loading