This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 708affa17ca branch-4.0: [memorygc](lrucache) do not prune memory if 
prune is disabled #59478 (#59501)
708affa17ca is described below

commit 708affa17ca12ab4caa45a6d1c14dd518b68801e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Dec 31 16:29:00 2025 +0800

    branch-4.0: [memorygc](lrucache) do not prune memory if prune is disabled 
#59478 (#59501)
    
    Cherry-picked from #59478
    
    Co-authored-by: yiguolei <[email protected]>
---
 be/src/runtime/memory/lru_cache_policy.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/memory/lru_cache_policy.h 
b/be/src/runtime/memory/lru_cache_policy.h
index c5dbec0878b..ddc3f186e7c 100644
--- a/be/src/runtime/memory/lru_cache_policy.h
+++ b/be/src/runtime/memory/lru_cache_policy.h
@@ -254,7 +254,11 @@ public:
         if (std::dynamic_pointer_cast<doris::DummyLRUCache>(_cache)) {
             return 0;
         }
-
+        if (!_enable_prune) {
+            LOG(INFO) << "[MemoryGC] " << type_string(_type)
+                      << " cache prune disabled, so could not adjust capacity 
to free memory";
+            return 0;
+        }
         size_t old_capacity = get_capacity();
         int64_t old_mem_consumption = mem_consumption();
         int64_t old_usage = get_usage();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to