diff --git a/core/src/db/meta/MySQLMetaImpl.cpp b/core/src/db/meta/MySQLMetaImpl.cpp index 57cce25c42..66033f389b 100644 --- a/core/src/db/meta/MySQLMetaImpl.cpp +++ b/core/src/db/meta/MySQLMetaImpl.cpp @@ -254,7 +254,7 @@ MySQLMetaImpl::Initialize() { if (!ret) { std::string msg = "Failed to create db directory " + options_.path_; ENGINE_LOG_ERROR << msg; - return Status(DB_META_TRANSACTION_FAILED, msg); + throw Exception(DB_META_TRANSACTION_FAILED, msg); } } diff --git a/core/src/db/meta/SqliteMetaImpl.cpp b/core/src/db/meta/SqliteMetaImpl.cpp index 98a5505dd2..f7e3f3bb24 100644 --- a/core/src/db/meta/SqliteMetaImpl.cpp +++ b/core/src/db/meta/SqliteMetaImpl.cpp @@ -143,7 +143,7 @@ SqliteMetaImpl::Initialize() { if (!ret) { std::string msg = "Failed to create db directory " + options_.path_; ENGINE_LOG_ERROR << msg; - return Status(DB_INVALID_PATH, msg); + throw Exception(DB_INVALID_PATH, msg); } } diff --git a/core/unittest/db/test_db.cpp b/core/unittest/db/test_db.cpp index 6262bda7d6..6e708cc161 100644 --- a/core/unittest/db/test_db.cpp +++ b/core/unittest/db/test_db.cpp @@ -40,6 +40,7 @@ static constexpr int64_t INSERT_LOOP = 1000; static constexpr int64_t SECONDS_EACH_HOUR = 3600; static constexpr int64_t DAY_SECONDS = 24 * 60 * 60; + milvus::engine::meta::TableSchema BuildTableSchema() { milvus::engine::meta::TableSchema table_info;