You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/05/31 11:12:47 UTC

[incubator-doris] branch master updated: [bugfix] Fix BE core about vectorized join build thread memtracker switch, and FileStat duplicate

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

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


The following commit(s) were added to refs/heads/master by this push:
     new c8d303a82c [bugfix] Fix BE core about vectorized join build thread memtracker switch, and FileStat duplicate
c8d303a82c is described below

commit c8d303a82ce7f267bcd6f2f83cc1b832de8bc0e3
Author: Xinyi Zou <zo...@gmail.com>
AuthorDate: Tue May 31 19:12:42 2022 +0800

    [bugfix] Fix BE core about vectorized join build thread memtracker switch, and FileStat duplicate
---
 be/src/runtime/minidump.cpp              | 22 ++++++++++++----------
 be/src/vec/exec/join/vhash_join_node.cpp |  1 +
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/be/src/runtime/minidump.cpp b/be/src/runtime/minidump.cpp
index 1c66771403..32d399d21d 100644
--- a/be/src/runtime/minidump.cpp
+++ b/be/src/runtime/minidump.cpp
@@ -32,11 +32,12 @@ int Minidump::_signo = SIGUSR1;
 std::unique_ptr<google_breakpad::ExceptionHandler> Minidump::_error_handler = nullptr;
 
 // Save the absolute path and create_time of a minidump file
-struct FileStat {
+struct MinidumpFileStat {
     std::string abs_path;
     time_t create_time;
 
-    FileStat(const std::string& path_, time_t ctime) : abs_path(path_), create_time(ctime) {}
+    MinidumpFileStat(const std::string& path_, time_t ctime)
+            : abs_path(path_), create_time(ctime) {}
 };
 
 Status Minidump::init() {
@@ -134,7 +135,7 @@ void Minidump::_clean_old_minidump() {
 
         // check file create time and sort and save in stats
         int ret = 0;
-        std::vector<FileStat> stats;
+        std::vector<MinidumpFileStat> stats;
         for (auto it = files.begin(); it != files.end(); ++it) {
             std::string path = config::minidump_dir + "/" + *it;
 
@@ -150,13 +151,14 @@ void Minidump::_clean_old_minidump() {
         }
 
         // sort file by ctime ascending
-        std::sort(stats.begin(), stats.end(), [](const FileStat& f1, const FileStat& f2) {
-            if (f1.create_time > f2.create_time) {
-                return false;
-            } else {
-                return true;
-            }
-        });
+        std::sort(stats.begin(), stats.end(),
+                  [](const MinidumpFileStat& f1, const MinidumpFileStat& f2) {
+                      if (f1.create_time > f2.create_time) {
+                          return false;
+                      } else {
+                          return true;
+                      }
+                  });
 
         int to_delete = stats.size() - config::max_minidump_file_number;
         int deleted = 0;
diff --git a/be/src/vec/exec/join/vhash_join_node.cpp b/be/src/vec/exec/join/vhash_join_node.cpp
index e9d61a982d..d181562b88 100644
--- a/be/src/vec/exec/join/vhash_join_node.cpp
+++ b/be/src/vec/exec/join/vhash_join_node.cpp
@@ -999,6 +999,7 @@ Status HashJoinNode::open(RuntimeState* state) {
 }
 
 void HashJoinNode::_hash_table_build_thread(RuntimeState* state, std::promise<Status>* status) {
+    SCOPED_ATTACH_TASK_THREAD(state, mem_tracker());
     status->set_value(_hash_table_build(state));
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org