diff --git a/core/src/db/meta/MySQLMetaImpl.cpp b/core/src/db/meta/MySQLMetaImpl.cpp index 57cce25c422336cb6114d73fa27f85fa08dee9ae..66033f389b9f17f4826d4d65cb8000a20233d322 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 98a5505dd2be625f0d279c566629eebfde148fb4..f7e3f3bb245390997050e080522aed1e4b43be27 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 6262bda7d6abd54f4f714aa39d77cc21d25f99ac..6e708cc161698ec21f45e44fca3a379b1a9ef874 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;