Skip to content

Commit

Permalink
[branch-2.0](cherry-pick) donot coredump when be can not start (#27928)…
Browse files Browse the repository at this point in the history
… (#34116)

Co-authored-by: Yongqiang YANG <[email protected]>
  • Loading branch information
zxealous and dataroaring authored Apr 25, 2024
1 parent ae9be51 commit 23bab29
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions be/src/service/doris_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ int main(int argc, char** argv) {
std::vector<doris::StorePath> 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<std::string> broken_paths;
Expand All @@ -364,15 +364,15 @@ 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)) {
if (doris::config::ignore_broken_disk) {
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 {
Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 23bab29

Please sign in to comment.