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

yiguolei pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 2558c2171b [bugfix](file cache) Fix the init file cache coredump 
(#23464) (#23527)
2558c2171b is described below

commit 2558c2171b4d00a3bef6653d4f89e5069abc446e
Author: Mingyu Chen <[email protected]>
AuthorDate: Sat Aug 26 17:27:57 2023 +0800

    [bugfix](file cache) Fix the init file cache coredump (#23464) (#23527)
    
    * [bugfix](file cache) Fix the init file cache coredump
    
    * fix compile
    
    Co-authored-by: Lightman <[email protected]>
---
 be/src/service/doris_main.cpp                         | 17 +++++------------
 be/src/vec/data_types/serde/data_type_decimal_serde.h |  2 +-
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp
index 4829b45cc7..f1c98ebd4b 100644
--- a/be/src/service/doris_main.cpp
+++ b/be/src/service/doris_main.cpp
@@ -408,32 +408,25 @@ int main(int argc, char** argv) {
                 .set_max_threads(cache_paths.size())
                 .build(&file_cache_init_pool);
 
-        std::vector<doris::Status> cache_status;
+        std::list<doris::Status> cache_status;
         for (auto& cache_path : cache_paths) {
             if (cache_path_set.find(cache_path.path) != cache_path_set.end()) {
                 LOG(WARNING) << fmt::format("cache path {} is duplicate", 
cache_path.path);
                 continue;
             }
 
-            cache_status.push_back(Status::OK());
             RETURN_IF_ERROR(file_cache_init_pool->submit_func(
                     std::bind(&doris::io::FileCacheFactory::create_file_cache,
                               &(doris::io::FileCacheFactory::instance()), 
cache_path.path,
-                              cache_path.init_settings(), 
&(cache_status.back()))));
+                              cache_path.init_settings(), 
&(cache_status.emplace_back()))));
 
             cache_path_set.emplace(cache_path.path);
-            // Status st = 
doris::io::FileCacheFactory::instance().create_file_cache(
-            //         cache_path.path, cache_path.init_settings());
-            // if (!st) {
-            //     LOG(FATAL) << st;
-            //     exit(-1);
-            // }
         }
 
         file_cache_init_pool->wait();
-        for (int i = 0; i < cache_status.size(); ++i) {
-            if (!cache_status[i].ok()) {
-                LOG(FATAL) << "failed to init file cache: " << i << ", err: " 
<< cache_status[i];
+        for (const auto& status : cache_status) {
+            if (!status.ok()) {
+                LOG(FATAL) << "failed to init file cache, err: " << status;
                 exit(-1);
             }
         }
diff --git a/be/src/vec/data_types/serde/data_type_decimal_serde.h 
b/be/src/vec/data_types/serde/data_type_decimal_serde.h
index 1bde810e87..ef016ea597 100644
--- a/be/src/vec/data_types/serde/data_type_decimal_serde.h
+++ b/be/src/vec/data_types/serde/data_type_decimal_serde.h
@@ -65,7 +65,7 @@ public:
 
     DataTypeDecimalSerDe(int scale_, int precision_)
             : scale(scale_),
-             precision(precision_),
+              precision(precision_),
               scale_multiplier(decimal_scale_multiplier<typename 
T::NativeType>(scale)) {}
 
     void serialize_one_cell_to_text(const IColumn& column, int row_num, 
BufferWritable& bw,


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

Reply via email to