yiguolei commented on code in PR #47462: URL: https://github.com/apache/doris/pull/47462#discussion_r1966504777
########## 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; + while (wg != nullptr && wg->enable_write_buffer_limit() && wg->exceed_write_buffer_limit() && Review Comment: 这个enable write buffer limit 只有等到整个wg的内存不足的时候才会动态的设置为true,默认是false。 -- 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