mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 23:45:28 +08:00
Merge branch 'branch-0.3.0' into 'branch-0.3.0'
add more error handling See merge request megasearch/vecwise_engine!127 Former-commit-id: 97c3a993ecd5135d56c8f552325d6f88a9e13674
This commit is contained in:
commit
116be69ca7
@ -37,12 +37,16 @@ DBWrapper::DBWrapper() {
|
||||
opt.meta.archive_conf.SetCriterias(criterial);
|
||||
|
||||
//create db root folder
|
||||
CommonUtil::CreateDirectory(opt.meta.path);
|
||||
ServerError err = CommonUtil::CreateDirectory(opt.meta.path);
|
||||
if(err != SERVER_SUCCESS) {
|
||||
std::cout << "ERROR! Failed to create database root path: " << opt.meta.path << std::endl;
|
||||
kill(0, SIGUSR1);
|
||||
}
|
||||
|
||||
zilliz::milvus::engine::DB::Open(opt, &db_);
|
||||
if(db_ == nullptr) {
|
||||
SERVER_LOG_ERROR << "Failed to open db";
|
||||
throw ServerException(SERVER_NULL_POINTER, "Failed to open db");
|
||||
std::cout << "ERROR! Failed to open database" << std::endl;
|
||||
kill(0, SIGUSR1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include <thrift/concurrency/PosixThreadFactory.h>
|
||||
|
||||
#include <thread>
|
||||
#include <iostream>
|
||||
|
||||
namespace zilliz {
|
||||
namespace milvus {
|
||||
@ -92,7 +93,8 @@ MilvusServer::StartService() {
|
||||
return;
|
||||
}
|
||||
} catch (apache::thrift::TException& ex) {
|
||||
//SERVER_LOG_ERROR << "Server encounter exception: " << ex.what();
|
||||
std::cout << "ERROR! " << ex.what() << std::endl;
|
||||
kill(0, SIGUSR1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user