diff --git a/be/src/runtime/memory/lru_cache_policy.h b/be/src/runtime/memory/lru_cache_policy.h index c06a6a03982011..a33fa0cb262416 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 (_cache == ExecEnv::GetInstance()->get_dummy_lru_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();