Loading cpp/src/db/DBImpl.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -296,7 +296,8 @@ DBImpl::CreateIndex(const std::string& table_id, const TableIndex& index) { std::vector<int> file_types; if (index.engine_type_ == static_cast<int32_t>(EngineType::FAISS_IDMAP)) { file_types = { static_cast<int32_t>(meta::TableFileSchema::NEW), static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE), static_cast<int32_t>(meta::TableFileSchema::NEW), static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE), }; } else { file_types = { Loading cpp/src/db/meta/MySQLMetaImpl.cpp +12 −9 Original line number Diff line number Diff line Loading @@ -148,14 +148,17 @@ static const MetaSchema TABLES_SCHEMA(META_TABLES, { }); // TableFiles schema static const MetaSchema TABLEFILES_SCHEMA( META_TABLEFILES, { MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"), MetaField("table_id", "VARCHAR(255)", "NOT NULL"), MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"), MetaField("file_id", "VARCHAR(255)", "NOT NULL"), MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"), MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("updated_time", "BIGINT", "NOT NULL"), MetaField("created_on", "BIGINT", "NOT NULL"), MetaField("date", "INT", "DEFAULT -1 NOT NULL"), static const MetaSchema TABLEFILES_SCHEMA(META_TABLEFILES, { MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"), MetaField("table_id", "VARCHAR(255)", "NOT NULL"), MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"), MetaField("file_id", "VARCHAR(255)", "NOT NULL"), MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"), MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("updated_time", "BIGINT", "NOT NULL"), MetaField("created_on", "BIGINT", "NOT NULL"), MetaField("date", "INT", "DEFAULT -1 NOT NULL"), }); } // namespace Loading cpp/src/scheduler/optimizer/HybridPass.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ namespace scheduler { bool HybridPass::Run(const TaskPtr& task) { // TODO: Index::IVFSQ8Hybrid, if nq < threshold set cpu, else set gpu if (task->Type() != TaskType::SearchTask) return false; if (task->Type() != TaskType::SearchTask) return false; auto search_task = std::static_pointer_cast<XSearchTask>(task); // if (search_task->file_->engine_type_ == engine::EngineType::FAISS_IVFSQ8Hybrid) return false; Loading @@ -32,4 +33,3 @@ HybridPass::Run(const TaskPtr& task) { } // namespace scheduler } // namespace milvus cpp/src/scheduler/optimizer/HybridPass.h +9 −10 Original line number Diff line number Diff line Loading @@ -16,16 +16,16 @@ // under the License. #pragma once #include <string> #include <vector> #include <condition_variable> #include <deque> #include <list> #include <memory> #include <mutex> #include <queue> #include <deque> #include <unordered_map> #include <string> #include <thread> #include <mutex> #include <condition_variable> #include <memory> #include <unordered_map> #include <vector> #include "Pass.h" Loading @@ -45,4 +45,3 @@ using HybridPassPtr = std::shared_ptr<HybridPass>; } // namespace scheduler } // namespace milvus cpp/src/scheduler/optimizer/Optimizer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -40,4 +40,3 @@ Optimizer::Run(const TaskPtr& task) { } // namespace scheduler } // namespace milvus Loading
cpp/src/db/DBImpl.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -296,7 +296,8 @@ DBImpl::CreateIndex(const std::string& table_id, const TableIndex& index) { std::vector<int> file_types; if (index.engine_type_ == static_cast<int32_t>(EngineType::FAISS_IDMAP)) { file_types = { static_cast<int32_t>(meta::TableFileSchema::NEW), static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE), static_cast<int32_t>(meta::TableFileSchema::NEW), static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE), }; } else { file_types = { Loading
cpp/src/db/meta/MySQLMetaImpl.cpp +12 −9 Original line number Diff line number Diff line Loading @@ -148,14 +148,17 @@ static const MetaSchema TABLES_SCHEMA(META_TABLES, { }); // TableFiles schema static const MetaSchema TABLEFILES_SCHEMA( META_TABLEFILES, { MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"), MetaField("table_id", "VARCHAR(255)", "NOT NULL"), MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"), MetaField("file_id", "VARCHAR(255)", "NOT NULL"), MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"), MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("updated_time", "BIGINT", "NOT NULL"), MetaField("created_on", "BIGINT", "NOT NULL"), MetaField("date", "INT", "DEFAULT -1 NOT NULL"), static const MetaSchema TABLEFILES_SCHEMA(META_TABLEFILES, { MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"), MetaField("table_id", "VARCHAR(255)", "NOT NULL"), MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"), MetaField("file_id", "VARCHAR(255)", "NOT NULL"), MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"), MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("updated_time", "BIGINT", "NOT NULL"), MetaField("created_on", "BIGINT", "NOT NULL"), MetaField("date", "INT", "DEFAULT -1 NOT NULL"), }); } // namespace Loading
cpp/src/scheduler/optimizer/HybridPass.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ namespace scheduler { bool HybridPass::Run(const TaskPtr& task) { // TODO: Index::IVFSQ8Hybrid, if nq < threshold set cpu, else set gpu if (task->Type() != TaskType::SearchTask) return false; if (task->Type() != TaskType::SearchTask) return false; auto search_task = std::static_pointer_cast<XSearchTask>(task); // if (search_task->file_->engine_type_ == engine::EngineType::FAISS_IVFSQ8Hybrid) return false; Loading @@ -32,4 +33,3 @@ HybridPass::Run(const TaskPtr& task) { } // namespace scheduler } // namespace milvus
cpp/src/scheduler/optimizer/HybridPass.h +9 −10 Original line number Diff line number Diff line Loading @@ -16,16 +16,16 @@ // under the License. #pragma once #include <string> #include <vector> #include <condition_variable> #include <deque> #include <list> #include <memory> #include <mutex> #include <queue> #include <deque> #include <unordered_map> #include <string> #include <thread> #include <mutex> #include <condition_variable> #include <memory> #include <unordered_map> #include <vector> #include "Pass.h" Loading @@ -45,4 +45,3 @@ using HybridPassPtr = std::shared_ptr<HybridPass>; } // namespace scheduler } // namespace milvus
cpp/src/scheduler/optimizer/Optimizer.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -40,4 +40,3 @@ Optimizer::Run(const TaskPtr& task) { } // namespace scheduler } // namespace milvus