This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 534d051c1ec branch-3.0: [enhacement](cloud) Make config::custom_conf_path default to use conf_path's value specified when started #50381 (#50474) 534d051c1ec is described below commit 534d051c1ecce3d9a89e0bf9e7cce7d90fd0bcb0 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Mon Apr 28 10:02:00 2025 +0800 branch-3.0: [enhacement](cloud) Make config::custom_conf_path default to use conf_path's value specified when started #50381 (#50474) Cherry-picked from #50381 Co-authored-by: Siyang Tang <tangsiy...@selectdb.com> --- cloud/src/common/config.h | 13 ++++++++++--- cloud/src/main.cpp | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cloud/src/common/config.h b/cloud/src/common/config.h index 5b4719c937a..25e52e01a75 100644 --- a/cloud/src/common/config.h +++ b/cloud/src/common/config.h @@ -54,9 +54,16 @@ CONF_Int32(log_verbose_level, "5"); // Only works when starting Cloud with --console. CONF_Bool(enable_file_logger, "true"); -// Custom conf path is default the same as conf path, and configs will be append to it. -// Otherwise, will a new custom conf file will be created. -CONF_String(custom_conf_path, "./conf/doris_cloud.conf"); +// Custom conf path is default empty. +// All mutable configs' modification needed to be persisted will be appended to conf path +// specified when started. +// +// If it is set to equivalent value of conf path specified when started, +// mutable configs' modification behavior will be the same as the description above. +// +// Otherwise, a new custom conf file will be created when mutable configs are modified +// and persisted, with all modification written to it. +CONF_String(custom_conf_path, ""); // recycler config CONF_mInt64(recycle_interval_seconds, "3600"); diff --git a/cloud/src/main.cpp b/cloud/src/main.cpp index 32667d0e1a2..8da0436c7b3 100644 --- a/cloud/src/main.cpp +++ b/cloud/src/main.cpp @@ -202,6 +202,9 @@ int main(int argc, char** argv) { std::cerr << "failed to init config file, conf=" << conf_file << std::endl; return -1; } + if (config::custom_conf_path.empty()) { + 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)) { std::cerr << "failed to init custom config file, conf=" << config::custom_conf_path --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org