Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[branch-2.0](cherry-pick) donot coredump when be can not start (#27928) #34116

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading