This is an automated email from the ASF dual-hosted git repository.
gabriellee 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 8819d73abd [fix](be) fix the crash when there is no tzfile in docker
env (#23071)
8819d73abd is described below
commit 8819d73abd1ef848a42fba3c5712cd40afa7937b
Author: zclllyybb <[email protected]>
AuthorDate: Tue Aug 22 18:56:36 2023 +0800
[fix](be) fix the crash when there is no tzfile in docker env (#23071)
---
be/src/util/timezone_utils.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/be/src/util/timezone_utils.cpp b/be/src/util/timezone_utils.cpp
index 077d1b3022..364bf53bbc 100644
--- a/be/src/util/timezone_utils.cpp
+++ b/be/src/util/timezone_utils.cpp
@@ -54,6 +54,11 @@ void TimezoneUtils::load_timezone_names() {
path += tzdir;
path += '/';
+ if (!std::filesystem::exists(path)) {
+ LOG_WARNING("Cannot find system tzfile. Abandon to preload timezone
name cache.");
+ return;
+ }
+
auto path_prefix_len = path.size();
for (auto const& dir_entry : std::filesystem::recursive_directory_iterator
{path}) {
if (dir_entry.is_regular_file()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]