This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new d84ee07ee73 branch-3.0: [fix](memory) Fix adjust cache capacity #45603
(#45665)
d84ee07ee73 is described below
commit d84ee07ee731092da79535e50d5ac950f93671de
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Dec 20 00:39:55 2024 +0800
branch-3.0: [fix](memory) Fix adjust cache capacity #45603 (#45665)
Cherry-picked from #45603
Co-authored-by: Xinyi Zou <[email protected]>
---
be/src/common/daemon.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/be/src/common/daemon.cpp b/be/src/common/daemon.cpp
index ce2a6878dba..f4905078d88 100644
--- a/be/src/common/daemon.cpp
+++ b/be/src/common/daemon.cpp
@@ -230,6 +230,11 @@ void refresh_memory_state_after_memory_change() {
}
void refresh_cache_capacity() {
+ if (doris::GlobalMemoryArbitrator::cache_adjust_capacity_notify.load(
+ std::memory_order_relaxed)) {
+ // the last cache capacity adjustment has not been completed.
+ return;
+ }
if (refresh_cache_capacity_sleep_time_ms <= 0) {
auto cache_capacity_reduce_mem_limit = int64_t(
doris::MemInfo::soft_mem_limit() *
config::cache_capacity_reduce_mem_limit_frac);
@@ -247,6 +252,8 @@ void refresh_cache_capacity() {
new_cache_capacity_adjust_weighted;
doris::GlobalMemoryArbitrator::notify_cache_adjust_capacity();
refresh_cache_capacity_sleep_time_ms =
config::memory_gc_sleep_time_ms;
+ } else {
+ refresh_cache_capacity_sleep_time_ms = 0;
}
}
refresh_cache_capacity_sleep_time_ms -=
config::memory_maintenance_sleep_time_ms;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]