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
commit dd493867dabe659d76518a40a30a93193143fc72 Author: zclllyybb <[email protected]> AuthorDate: Mon May 27 18:55:39 2024 +0800 Revert "[Fix](timezone) Introduce a config to use Doris tzdata directly (#31561)" (#35316) This reverts commit 65d998f1e92873d3a2dc2fdcbcf578eba688c19c. --- be/src/common/config.cpp | 1 - be/src/common/config.h | 1 - be/src/util/timezone_utils.cpp | 13 ++++--------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp index 7bc2d1ee1ab..6a4cd152a1b 100644 --- a/be/src/common/config.cpp +++ b/be/src/common/config.cpp @@ -1155,7 +1155,6 @@ DEFINE_Bool(ignore_always_true_predicate_for_segment, "true"); // Dir of default timezone files DEFINE_String(default_tzfiles_path, "${DORIS_HOME}/zoneinfo"); -DEFINE_Bool(use_doris_tzfile, "false"); // Ingest binlog work pool size, -1 is disable, 0 is hardware concurrency DEFINE_Int32(ingest_binlog_work_pool_size, "-1"); diff --git a/be/src/common/config.h b/be/src/common/config.h index eedb9e21950..a53c985de36 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -1238,7 +1238,6 @@ DECLARE_Bool(ignore_always_true_predicate_for_segment); // Dir of default timezone files DECLARE_String(default_tzfiles_path); -DECLARE_Bool(use_doris_tzfile); // Ingest binlog work pool size DECLARE_Int32(ingest_binlog_work_pool_size); diff --git a/be/src/util/timezone_utils.cpp b/be/src/util/timezone_utils.cpp index 6d561f2151e..8ea3990a6f6 100644 --- a/be/src/util/timezone_utils.cpp +++ b/be/src/util/timezone_utils.cpp @@ -82,9 +82,6 @@ void TimezoneUtils::load_timezone_names() { path = config::default_tzfiles_path + '/'; CHECK(std::filesystem::exists(path)) << "Can't find system tzfiles or default tzfiles neither."; - } else if (config::use_doris_tzfile) { - path = config::default_tzfiles_path + '/'; - LOG(INFO) << "Directly use Doris' tzfiles in " << path; } auto path_prefix_len = path.size(); @@ -243,14 +240,12 @@ void TimezoneUtils::load_timezones_to_cache() { base_str += tzdir; base_str += '/'; - if (!std::filesystem::exists(base_str)) { + auto root_path = std::filesystem::path {base_str}; + if (!std::filesystem::exists(root_path)) { LOG_WARNING("Cannot find system tzfile. Use default instead."); - base_str = config::default_tzfiles_path + '/'; - CHECK(std::filesystem::exists(base_str)) + root_path = config::default_tzfiles_path + '/'; + CHECK(std::filesystem::exists(root_path)) << "Can't find system tzfiles or default tzfiles neither."; - } else if (config::use_doris_tzfile) { - base_str = config::default_tzfiles_path + '/'; - LOG(INFO) << "Directly use Doris' tzfiles in " << base_str; } std::set<std::string> ignore_paths = {"posix", "right"}; // duplications --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
