Skip to content

Commit 3ebec0a

Browse files
authored
[bugfix](cloud) Fix ms crash when set the custom config path (apache#50246)
### What problem does this PR solve? Fix ms crash when set the custom config path Related PR: apache#45394 How to reproduce: set custom config path in doris_cloud.conf: ``` custom_conf_path = ./conf/doris_cloud_custom.conf ``` Then restart the ms, ms will fail to start.
1 parent 4abda47 commit 3ebec0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cloud/src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ int main(int argc, char** argv) {
198198
}
199199

200200
auto conf_file = args.get<std::string>(ARG_CONF);
201-
if (!config::init(conf_file.c_str(), true)) {
201+
if (!config::init(conf_file.c_str(), true, true, true)) {
202202
std::cerr << "failed to init config file, conf=" << conf_file << std::endl;
203203
return -1;
204204
}
205205
if (config::custom_conf_path.empty()) {
206206
config::custom_conf_path = conf_file;
207207
}
208208
if (!std::filesystem::equivalent(conf_file, config::custom_conf_path) &&
209-
!config::init(config::custom_conf_path.c_str(), false)) {
209+
!config::init(config::custom_conf_path.c_str(), true, false, false)) {
210210
std::cerr << "failed to init custom config file, conf=" << config::custom_conf_path
211211
<< std::endl;
212212
return -1;

0 commit comments

Comments
 (0)