提交 96dffcf8 编写于 作者: S starlord

format code


Former-commit-id: f809ffd4505ada713620e4996d6fe1004bcc69dc
上级 a05cebf5
...@@ -40,12 +40,14 @@ DBWrapper::StartService() { ...@@ -40,12 +40,14 @@ DBWrapper::StartService() {
engine::DBOptions opt; engine::DBOptions opt;
s = config.GetDBConfigBackendUrl(opt.meta_.backend_uri_); s = config.GetDBConfigBackendUrl(opt.meta_.backend_uri_);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl;
return s; return s;
} }
std::string path; std::string path;
s = config.GetDBConfigPrimaryPath(path); s = config.GetDBConfigPrimaryPath(path);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl;
return s; return s;
} }
...@@ -55,7 +57,7 @@ DBWrapper::StartService() { ...@@ -55,7 +57,7 @@ DBWrapper::StartService() {
s = config.GetDBConfigSecondaryPath(db_slave_path); s = config.GetDBConfigSecondaryPath(db_slave_path);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
StringHelpFunctions::SplitStringByDelimeter(db_slave_path, ";", opt.meta_.slave_paths_); StringHelpFunctions::SplitStringByDelimeter(db_slave_path, ";", opt.meta_.slave_paths_);
...@@ -64,14 +66,14 @@ DBWrapper::StartService() { ...@@ -64,14 +66,14 @@ DBWrapper::StartService() {
s = config.GetCacheConfigCacheInsertData(opt.insert_cache_immediately_); s = config.GetCacheConfigCacheInsertData(opt.insert_cache_immediately_);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
std::string mode; std::string mode;
s = config.GetServerConfigDeployMode(mode); s = config.GetServerConfigDeployMode(mode);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
if (mode == "single") { if (mode == "single") {
...@@ -91,7 +93,7 @@ DBWrapper::StartService() { ...@@ -91,7 +93,7 @@ DBWrapper::StartService() {
s = config.GetEngineConfigOmpThreadNum(omp_thread); s = config.GetEngineConfigOmpThreadNum(omp_thread);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
if (omp_thread > 0) { if (omp_thread > 0) {
...@@ -110,7 +112,7 @@ DBWrapper::StartService() { ...@@ -110,7 +112,7 @@ DBWrapper::StartService() {
s = config.GetEngineConfigUseBlasThreshold(use_blas_threshold); s = config.GetEngineConfigUseBlasThreshold(use_blas_threshold);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
faiss::distance_compute_blas_threshold = use_blas_threshold; faiss::distance_compute_blas_threshold = use_blas_threshold;
...@@ -121,7 +123,7 @@ DBWrapper::StartService() { ...@@ -121,7 +123,7 @@ DBWrapper::StartService() {
s = config.GetDBConfigArchiveDiskThreshold(disk); s = config.GetDBConfigArchiveDiskThreshold(disk);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
if (disk > 0) { if (disk > 0) {
...@@ -131,7 +133,7 @@ DBWrapper::StartService() { ...@@ -131,7 +133,7 @@ DBWrapper::StartService() {
s = config.GetDBConfigArchiveDaysThreshold(days); s = config.GetDBConfigArchiveDaysThreshold(days);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
if (days > 0) { if (days > 0) {
...@@ -174,7 +176,7 @@ DBWrapper::StartService() { ...@@ -174,7 +176,7 @@ DBWrapper::StartService() {
s = config.GetDBConfigPreloadTable(preload_tables); s = config.GetDBConfigPreloadTable(preload_tables);
if (!s.ok()) { if (!s.ok()) {
std::cerr << s.ToString() << std::endl; std::cerr << s.ToString() << std::endl;
kill(0, SIGUSR1); return s;
} }
s = PreloadTables(preload_tables); s = PreloadTables(preload_tables);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册