mirror of https://github.com/milvus-io/milvus.git
* #1234 do service check when Milvus startup Signed-off-by: yudong.cai <yudong.cai@zilliz.com> * #1234 update error log Signed-off-by: yudong.cai <yudong.cai@zilliz.com>pull/1406/head
parent
09b0a69c1c
commit
636f5c9cb6
|
@ -54,6 +54,7 @@ Please mark all change in change log and use the issue from GitHub
|
|||
- \#1078 - Move 'insert_buffer_size' to Cache Config section
|
||||
- \#1105 - Error message is not clear when creating IVFSQ8H index without gpu resources
|
||||
- \#740, #849, #878, #972, #1033, #1161, #1173, #1199, #1190, #1223, #1222, #1257, #1264, #1269, #1164, #1303, #1304, #1324, #1388 - Various fixes and improvements for Milvus documentation.
|
||||
- \#1234 - Do S3 server validation check when Milvus startup
|
||||
- \#1263 - Allow system conf modifiable and some take effect directly
|
||||
- \#1320 - Remove debug logging from faiss
|
||||
|
||||
|
|
|
@ -196,8 +196,7 @@ Server::Start() {
|
|||
server::Metrics::GetInstance().Init();
|
||||
server::SystemInfo::GetInstance().Init();
|
||||
|
||||
StartService();
|
||||
return Status::OK();
|
||||
return StartService();
|
||||
} catch (std::exception& ex) {
|
||||
std::string str = "Milvus server encounter exception: " + std::string(ex.what());
|
||||
return Status(SERVER_UNEXPECTED_ERROR, str);
|
||||
|
@ -253,14 +252,36 @@ Server::LoadConfig() {
|
|||
return milvus::Status::OK();
|
||||
}
|
||||
|
||||
void
|
||||
Status
|
||||
Server::StartService() {
|
||||
engine::KnowhereResource::Initialize();
|
||||
Status stat;
|
||||
stat = engine::KnowhereResource::Initialize();
|
||||
if (!stat.ok()) {
|
||||
SERVER_LOG_ERROR << "KnowhereResource initialize fail: " << stat.message();
|
||||
goto FAIL;
|
||||
}
|
||||
|
||||
scheduler::StartSchedulerService();
|
||||
DBWrapper::GetInstance().StartService();
|
||||
|
||||
stat = DBWrapper::GetInstance().StartService();
|
||||
if (!stat.ok()) {
|
||||
SERVER_LOG_ERROR << "DBWrapper start service fail: " << stat.message();
|
||||
goto FAIL;
|
||||
}
|
||||
|
||||
grpc::GrpcServer::GetInstance().Start();
|
||||
web::WebServer::GetInstance().Start();
|
||||
storage::S3ClientWrapper::GetInstance().StartService();
|
||||
|
||||
stat = storage::S3ClientWrapper::GetInstance().StartService();
|
||||
if (!stat.ok()) {
|
||||
SERVER_LOG_ERROR << "S3Client start service fail: " << stat.message();
|
||||
goto FAIL;
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
FAIL:
|
||||
std::cerr << "Milvus initializes fail: " << stat.message() << std::endl;
|
||||
return stat;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -41,7 +41,7 @@ class Server {
|
|||
Status
|
||||
LoadConfig();
|
||||
|
||||
void
|
||||
Status
|
||||
StartService();
|
||||
void
|
||||
StopService();
|
||||
|
|
|
@ -64,7 +64,10 @@ S3ClientWrapper::StartService() {
|
|||
client_ptr_ = std::make_shared<S3ClientMock>();
|
||||
}
|
||||
|
||||
return CreateBucket();
|
||||
std::cout << "S3 service connection check ...... " << std::flush;
|
||||
Status stat = CreateBucket();
|
||||
std::cout << (stat.ok() ? "OK" : "FAIL") << std::endl;
|
||||
return stat;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue