From ad837af0cec92bd6a048f1ccfba8e6de7d532075 Mon Sep 17 00:00:00 2001 From: glutenperfbot Date: Thu, 12 Dec 2024 22:00:59 +0000 Subject: [PATCH 1/2] [GLUTEN-6887][VL] Daily Update Velox Version (2024_12_13) Signed-off-by: glutenperfbot --- ep/build-velox/src/get_velox.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ep/build-velox/src/get_velox.sh b/ep/build-velox/src/get_velox.sh index 167804028bc6..c0fcfda64f47 100755 --- a/ep/build-velox/src/get_velox.sh +++ b/ep/build-velox/src/get_velox.sh @@ -17,7 +17,7 @@ set -exu VELOX_REPO=https://github.com/oap-project/velox.git -VELOX_BRANCH=2024_12_12 +VELOX_BRANCH=2024_12_13 VELOX_HOME="" OS=`uname -s` From 9d413bebbbfcc7fa0d8338f7250d93e74612d25d Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Fri, 13 Dec 2024 14:46:58 +0800 Subject: [PATCH 2/2] adding new cachePool Signed-off-by: Yuan Zhou --- cpp/velox/memory/VeloxMemoryManager.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cpp/velox/memory/VeloxMemoryManager.cc b/cpp/velox/memory/VeloxMemoryManager.cc index 4c8a6669366d..101a9db4a889 100644 --- a/cpp/velox/memory/VeloxMemoryManager.cc +++ b/cpp/velox/memory/VeloxMemoryManager.cc @@ -335,27 +335,34 @@ bool VeloxMemoryManager::tryDestructSafe() { // Velox memory manager considered safe to destruct when no alive pools. if (veloxMemoryManager_) { - if (veloxMemoryManager_->numPools() > 2) { + if (veloxMemoryManager_->numPools() > 3) { + GLUTEN_CHECK(false, "Unreachable code"); return false; } - if (veloxMemoryManager_->numPools() == 2) { + if (veloxMemoryManager_->numPools() == 3) { // Assert the pool is spill pool // See https://github.com/facebookincubator/velox/commit/e6f84e8ac9ef6721f527a2d552a13f7e79bdf72e + // https://github.com/facebookincubator/velox/commit/ac134400b5356c5ba3f19facee37884aa020afdc int32_t spillPoolCount = 0; + int32_t cachePoolCount = 0; int32_t tracePoolCount = 0; veloxMemoryManager_->testingDefaultRoot().visitChildren([&](velox::memory::MemoryPool* child) -> bool { if (child == veloxMemoryManager_->spillPool()) { spillPoolCount++; } + if (child == veloxMemoryManager_->cachePool()) { + cachePoolCount++; + } if (child == veloxMemoryManager_->tracePool()) { tracePoolCount++; } return true; }); GLUTEN_CHECK(spillPoolCount == 1, "Illegal pool count state: spillPoolCount: " + std::to_string(spillPoolCount)); + GLUTEN_CHECK(cachePoolCount == 1, "Illegal pool count state: cachePoolCount: " + std::to_string(cachePoolCount)); GLUTEN_CHECK(tracePoolCount == 1, "Illegal pool count state: tracePoolCount: " + std::to_string(tracePoolCount)); } - if (veloxMemoryManager_->numPools() < 2) { + if (veloxMemoryManager_->numPools() < 3) { GLUTEN_CHECK(false, "Unreachable code"); } }