xinyiZzz commented on code in PR #41018:
URL: https://github.com/apache/doris/pull/41018#discussion_r1767187367


##########
be/src/olap/memtable_memory_limiter.cpp:
##########
@@ -75,33 +75,41 @@ void 
MemTableMemoryLimiter::register_writer(std::weak_ptr<MemTableWriter> writer
     _writers.push_back(writer);
 }
 
-bool MemTableMemoryLimiter::_sys_avail_mem_less_than_warning_water_mark() {
+int64_t MemTableMemoryLimiter::_sys_avail_mem_less_than_warning_water_mark() {
     // reserve a small amount of memory so we do not trigger MinorGC
-    return doris::GlobalMemoryArbitrator::sys_mem_available() <
-           doris::MemInfo::sys_mem_available_warning_water_mark() +
-                   config::memtable_limiter_reserved_memory_bytes;
+    return doris::MemInfo::sys_mem_available_warning_water_mark() -
+           doris::GlobalMemoryArbitrator::sys_mem_available() +
+           config::memtable_limiter_reserved_memory_bytes;

Review Comment:
   should it be `xxx - config::memtable_limiter_reserved_memory_bytes;` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to