From ab09a4df61516e393c132762204562c83e46e9dd Mon Sep 17 00:00:00 2001 From: starlord Date: Fri, 6 Sep 2019 11:23:41 +0800 Subject: [PATCH 1/2] MS-489 GPU search result is wrong when index_type is IVFLAT/IVF_SQ8 and metric_type is IP Former-commit-id: 6e1bf08e30e3c15679d386bdb6d93429c3e27418 --- cpp/src/db/DBImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index d3b9e1fc1a..17272c588c 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -255,7 +255,7 @@ Status DBImpl::CreateIndex(const std::string& table_id, const TableIndex& index) if(!utils::IsSameIndex(old_index, new_index)) { DropIndex(table_id); - status = meta_ptr_->UpdateTableIndexParam(table_id, index); + status = meta_ptr_->UpdateTableIndexParam(table_id, new_index); if (!status.ok()) { ENGINE_LOG_ERROR << "Failed to update table index info for table: " << table_id; return status; From 8e452fd385d4b0bfc5313ba8190543270343e083 Mon Sep 17 00:00:00 2001 From: starlord Date: Fri, 6 Sep 2019 11:43:24 +0800 Subject: [PATCH 2/2] MS-465 Describe table result confused Former-commit-id: 0bf6abc9effa685d67269c00764be08e1b15fc2d --- cpp/src/db/DBImpl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 17272c588c..3a3e738e11 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -104,7 +104,7 @@ Status DBImpl::CreateTable(meta::TableSchema& table_schema) { } meta::TableSchema temp_schema = table_schema; - temp_schema.index_file_size_ *= ONE_MB; + temp_schema.index_file_size_ *= ONE_MB; //store as MB return meta_ptr_->CreateTable(temp_schema); } @@ -139,7 +139,9 @@ Status DBImpl::DescribeTable(meta::TableSchema& table_schema) { return Status::Error("Milsvus server is shutdown!"); } - return meta_ptr_->DescribeTable(table_schema); + auto stat = meta_ptr_->DescribeTable(table_schema); + table_schema.index_file_size_ /= ONE_MB; //return as MB + return stat; } Status DBImpl::HasTable(const std::string& table_id, bool& has_or_not) {