From 11a236dd86f2f25777f2df9db9f1fef4f71e97f7 Mon Sep 17 00:00:00 2001 From: Hongze Zhang Date: Tue, 20 Aug 2024 17:03:54 +0800 Subject: [PATCH] [GLUTEN-6864][VL] Set a Velox gflag to allow growing buffer created in another Velox task (#6932) Closes #6864 --- cpp/velox/compute/VeloxBackend.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/velox/compute/VeloxBackend.cc b/cpp/velox/compute/VeloxBackend.cc index cba573ade613..8dc3ade80dec 100644 --- a/cpp/velox/compute/VeloxBackend.cc +++ b/cpp/velox/compute/VeloxBackend.cc @@ -45,6 +45,7 @@ DECLARE_bool(velox_exception_user_stacktrace_enabled); DECLARE_int32(velox_memory_num_shared_leaf_pools); DECLARE_bool(velox_memory_use_hugepages); +DECLARE_bool(velox_memory_pool_capacity_transfer_across_tasks); DECLARE_int32(cache_prefetch_min_pct); DECLARE_int32(gluten_velox_aysnc_timeout_on_task_stopping); @@ -87,6 +88,9 @@ void VeloxBackend::init(const std::unordered_map& conf FLAGS_logtostderr = true; google::InitGoogleLogging("gluten"); + // Allow growing buffer in another task through its memory pool. + FLAGS_velox_memory_pool_capacity_transfer_across_tasks = true; + // Avoid creating too many shared leaf pools. FLAGS_velox_memory_num_shared_leaf_pools = 0;