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

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

commit 674b0ab934453c918b2e0081d9dbd52b87ecc0a3
Author: wangbo <wan...@apache.org>
AuthorDate: Mon Jul 31 22:28:41 2023 +0800

    [Fix](executor)Fix incorrect mem_limit return value type (#22415)
---
 be/src/runtime/task_group/task_group.h | 2 +-
 be/src/util/mem_info.cpp               | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/be/src/runtime/task_group/task_group.h 
b/be/src/runtime/task_group/task_group.h
index 876f981cba..c96664fc53 100644
--- a/be/src/runtime/task_group/task_group.h
+++ b/be/src/runtime/task_group/task_group.h
@@ -92,7 +92,7 @@ public:
         return _enable_memory_overcommit;
     };
 
-    bool memory_limit() const {
+    int64_t memory_limit() const {
         std::shared_lock<std::shared_mutex> r_lock(_mutex);
         return _memory_limit;
     };
diff --git a/be/src/util/mem_info.cpp b/be/src/util/mem_info.cpp
index f343190a8f..b28a0b43fd 100644
--- a/be/src/util/mem_info.cpp
+++ b/be/src/util/mem_info.cpp
@@ -250,9 +250,9 @@ int64_t MemInfo::tg_soft_memory_limit_gc(int64_t 
request_free_memory, RuntimePro
     std::vector<int64_t> used_memorys;
     std::vector<int64_t> exceeded_memorys;
     for (const auto& task_group : task_groups) {
-        auto used_memory = task_group->memory_used();
-        auto exceeded = used_memory - task_group->memory_limit();
-        auto exceeded_memory = exceeded > 0 ? exceeded : 0;
+        int64_t used_memory = task_group->memory_used();
+        int64_t exceeded = used_memory - task_group->memory_limit();
+        int64_t exceeded_memory = exceeded > 0 ? exceeded : 0;
         total_exceeded_memory += exceeded_memory;
         used_memorys.emplace_back(used_memory);
         exceeded_memorys.emplace_back(exceeded_memory);


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

Reply via email to