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 c95eff563b6 [fix](load) fix memtable memory limiter total mem usage
(#41245)
c95eff563b6 is described below
commit c95eff563b61e5f3bb3e73d5d27caa9c8001f7d3
Author: Kaijie Chen <[email protected]>
AuthorDate: Wed Sep 25 14:14:35 2024 +0800
[fix](load) fix memtable memory limiter total mem usage (#41245)
## Proposed changes
Previously, `mem_usage = write_mem + flush_mem`, because `active_mem` is
included in `write_mem`.
After #40912, `write_mem` becomes `queue_mem`, which no longer includes
`active_mem`.
This PR fixes this problem, by setting `mem_usage = active_mem +
queue_mem + flush_mem`
---
be/src/olap/memtable_memory_limiter.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/olap/memtable_memory_limiter.cpp
b/be/src/olap/memtable_memory_limiter.cpp
index 213d5aaab9a..9ec1a3461ea 100644
--- a/be/src/olap/memtable_memory_limiter.cpp
+++ b/be/src/olap/memtable_memory_limiter.cpp
@@ -251,7 +251,7 @@ void MemTableMemoryLimiter::_refresh_mem_tracker() {
_writers.pop_back();
}
}
- _mem_usage = _flush_mem_usage + _queue_mem_usage;
+ _mem_usage = _active_mem_usage + _queue_mem_usage + _flush_mem_usage;
g_memtable_active_memory.set_value(_active_mem_usage);
g_memtable_write_memory.set_value(_queue_mem_usage);
g_memtable_flush_memory.set_value(_flush_mem_usage);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]