diff --git a/CHANGELOG.md b/CHANGELOG.md index 054882fa82482d7dab3a49ab8999913f4e5280d5..bd396cb258e2c248dcc38552257658447723a574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/core/src/server/Server.cpp b/core/src/server/Server.cpp index bd2f5baf3bae2e6713ee6726f51ac01f52cb37f0..63a5b5138260d988f54e1c714ffb70cb65932dcb 100644 --- a/core/src/server/Server.cpp +++ b/core/src/server/Server.cpp @@ -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 diff --git a/core/src/server/Server.h b/core/src/server/Server.h index 6b688e36c946af324b7c8c37e028bc39d17af09d..25d3535e425010b1a007a9393f4dc8c68f06bdc4 100644 --- a/core/src/server/Server.h +++ b/core/src/server/Server.h @@ -41,7 +41,7 @@ class Server { Status LoadConfig(); - void + Status StartService(); void StopService(); diff --git a/core/src/storage/s3/S3ClientWrapper.cpp b/core/src/storage/s3/S3ClientWrapper.cpp index 8ffe2225e1077361227da439b6e0844d5daf92e8..e4b1fb61c18ba7a7cac6fb6d63924d3a4d91635b 100644 --- a/core/src/storage/s3/S3ClientWrapper.cpp +++ b/core/src/storage/s3/S3ClientWrapper.cpp @@ -64,7 +64,10 @@ S3ClientWrapper::StartService() { client_ptr_ = std::make_shared(); } - return CreateBucket(); + std::cout << "S3 service connection check ...... " << std::flush; + Status stat = CreateBucket(); + std::cout << (stat.ok() ? "OK" : "FAIL") << std::endl; + return stat; } void