From 094b764761a5bd90574e7e103469d513fcfc72a1 Mon Sep 17 00:00:00 2001 From: zxealous Date: Thu, 25 Apr 2024 20:46:14 +0800 Subject: [PATCH] [branch-2.0](cherry-pick) donot coredump when be can not start (#27928) (#34116) Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com> --- be/src/service/doris_main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp index a350f4438aedb1..1a9c0d5102e691 100644 --- a/be/src/service/doris_main.cpp +++ b/be/src/service/doris_main.cpp @@ -351,7 +351,7 @@ int main(int argc, char** argv) { std::vector paths; auto olap_res = doris::parse_conf_store_paths(doris::config::storage_root_path, &paths); if (!olap_res) { - LOG(FATAL) << "parse config storage path failed, path=" << doris::config::storage_root_path; + LOG(ERROR) << "parse config storage path failed, path=" << doris::config::storage_root_path; exit(-1); } std::set broken_paths; @@ -364,7 +364,7 @@ int main(int argc, char** argv) { LOG(WARNING) << "ignore broken disk, path = " << it->path; it = paths.erase(it); } else { - LOG(FATAL) << "a broken disk is found " << it->path; + LOG(ERROR) << "a broken disk is found " << it->path; exit(-1); } } else if (!doris::check_datapath_rw(it->path)) { @@ -372,7 +372,7 @@ int main(int argc, char** argv) { LOG(WARNING) << "read write test file failed, path=" << it->path; it = paths.erase(it); } else { - LOG(FATAL) << "read write test file failed, path=" << it->path; + LOG(ERROR) << "read write test file failed, path=" << it->path; exit(-1); } } else { @@ -381,14 +381,14 @@ int main(int argc, char** argv) { } if (paths.empty()) { - LOG(FATAL) << "All disks are broken, exit."; + LOG(ERROR) << "All disks are broken, exit."; exit(-1); } // initialize libcurl here to avoid concurrent initialization auto curl_ret = curl_global_init(CURL_GLOBAL_ALL); if (curl_ret != 0) { - LOG(FATAL) << "fail to initialize libcurl, curl_ret=" << curl_ret; + LOG(ERROR) << "fail to initialize libcurl, curl_ret=" << curl_ret; exit(-1); } // add logger for thrift internal @@ -479,7 +479,7 @@ int main(int argc, char** argv) { doris::StorageEngine* engine = nullptr; auto st = doris::StorageEngine::open(options, &engine); if (!st.ok()) { - LOG(FATAL) << "fail to open StorageEngine, res=" << st; + LOG(ERROR) << "fail to open StorageEngine, res=" << st; exit(-1); } exec_env->set_storage_engine(engine);