[fix](config) for compatibility issue of log dir config (#34734)

* [fix](config) for compatibility issue of log dir config

* 1
This commit is contained in:
Mingyu Chen
2024-05-12 09:44:15 +08:00
committed by yiguolei
parent 20e2d2e2f8
commit cadbbdd2c0
2 changed files with 16 additions and 3 deletions

View File

@ -376,7 +376,13 @@ public class ConfigBase {
if (matcher == null || matcher.match(confKey)) {
List<String> config = Lists.newArrayList();
config.add(confKey);
config.add(getConfValue(f));
String value = getConfValue(f);
// For compatibility, this PR #32933 change the log dir's config logic,
// and deprecate the `sys_log_dir` config.
if (confKey.equals("sys_log_dir") && Strings.isNullOrEmpty(value)) {
value = System.getenv("DORIS_HOME") + "/log";
}
config.add(value);
config.add(f.getType().getSimpleName());
config.add(String.valueOf(confField.mutable()));
config.add(String.valueOf(confField.masterOnly()));