jacktengg commented on code in PR #47462:
URL: https://github.com/apache/doris/pull/47462#discussion_r1966473493


##########
be/src/olap/memtable_memory_limiter.cpp:
##########
@@ -110,7 +111,23 @@ int64_t MemTableMemoryLimiter::_need_flush() {
     return need_flush - _queue_mem_usage;
 }
 
-void MemTableMemoryLimiter::handle_memtable_flush() {
+void 
MemTableMemoryLimiter::handle_workload_group_memtable_flush(WorkloadGroupPtr 
wg) {
+    // It means some query is pending on here to flush memtable and to 
continue running.
+    // So that should wait here.
+    // Wait at most 1s, because this code is not aware cancel flag. If the 
load task is cancelled
+    // Should releae memory quickly.
+    using namespace std::chrono_literals;
+    int32_t sleep_times = 10;

Review Comment:
   是最长等待1s. 每次循环等待100ms,最多循环10次.



-- 
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