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/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 82bce1b566e [fix](compile) fix implicit float-to-int conversion in 
mem_info calculation (#33311)
82bce1b566e is described below

commit 82bce1b566e476775a6d30a89ee70ca7b87ebc8d
Author: zy-kkk <zhongy...@gmail.com>
AuthorDate: Mon Apr 8 07:33:46 2024 +0800

    [fix](compile) fix implicit float-to-int conversion in mem_info calculation 
(#33311)
---
 be/src/util/mem_info.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/util/mem_info.cpp b/be/src/util/mem_info.cpp
index 3caee29921c..a36acddc139 100644
--- a/be/src/util/mem_info.cpp
+++ b/be/src/util/mem_info.cpp
@@ -523,7 +523,7 @@ void MemInfo::init() {
     bool is_percent = true;
     _s_mem_limit = ParseUtil::parse_mem_spec(config::mem_limit, -1, 
_s_physical_mem, &is_percent);
     _s_mem_limit_str = PrettyPrinter::print(_s_mem_limit, TUnit::BYTES);
-    _s_soft_mem_limit = _s_mem_limit * config::soft_mem_limit_frac;
+    _s_soft_mem_limit = static_cast<int64_t>(_s_mem_limit * 
config::soft_mem_limit_frac);
     _s_soft_mem_limit_str = PrettyPrinter::print(_s_soft_mem_limit, 
TUnit::BYTES);
 
     LOG(INFO) << "Physical Memory: " << PrettyPrinter::print(_s_physical_mem, 
TUnit::BYTES);


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

Reply via email to