diff --git a/be/src/runtime/memory/lru_cache_policy.h b/be/src/runtime/memory/lru_cache_policy.h index c5dbec0878b7de..ddc3f186e7c933 100644 --- a/be/src/runtime/memory/lru_cache_policy.h +++ b/be/src/runtime/memory/lru_cache_policy.h @@ -254,7 +254,11 @@ class LRUCachePolicy : public CachePolicy { if (std::dynamic_pointer_cast(_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();