This is an automated email from the ASF dual-hosted git repository.

xuyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ebec0a2e91 [bugfix](cloud) Fix ms crash when set the custom config 
path (#50246)
3ebec0a2e91 is described below

commit 3ebec0a2e91199af5e7195d008a586ac13a195aa
Author: xy720 <[email protected]>
AuthorDate: Mon Apr 28 17:28:45 2025 +0800

    [bugfix](cloud) Fix ms crash when set the custom config path (#50246)
    
    ### What problem does this PR solve?
    
    Fix ms crash when set the custom config path
    
    Related PR: #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.
---
 cloud/src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cloud/src/main.cpp b/cloud/src/main.cpp
index 8da0436c7b3..bb1c2c3441c 100644
--- a/cloud/src/main.cpp
+++ b/cloud/src/main.cpp
@@ -198,7 +198,7 @@ int main(int argc, char** argv) {
     }
 
     auto conf_file = args.get<std::string>(ARG_CONF);
-    if (!config::init(conf_file.c_str(), true)) {
+    if (!config::init(conf_file.c_str(), true, true, true)) {
         std::cerr << "failed to init config file, conf=" << conf_file << 
std::endl;
         return -1;
     }
@@ -206,7 +206,7 @@ int main(int argc, char** argv) {
         config::custom_conf_path = conf_file;
     }
     if (!std::filesystem::equivalent(conf_file, config::custom_conf_path) &&
-        !config::init(config::custom_conf_path.c_str(), false)) {
+        !config::init(config::custom_conf_path.c_str(), true, false, false)) {
         std::cerr << "failed to init custom config file, conf=" << 
config::custom_conf_path
                   << std::endl;
         return -1;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to