diff --git a/velox/common/memory/MemoryArbitrator.cpp b/velox/common/memory/MemoryArbitrator.cpp index 6cb5bcb2ad99..e3a8d6a054e1 100644 --- a/velox/common/memory/MemoryArbitrator.cpp +++ b/velox/common/memory/MemoryArbitrator.cpp @@ -478,5 +478,9 @@ void testingRunArbitration( static_cast(pool)->testingManager()->shrinkPools( targetBytes, allowSpill); pool->leaveArbitration(); + + // This function is simulating an arbitration triggered by growCapacity, which + // would check this. + static_cast(pool)->testingCheckIfAborted(); } } // namespace facebook::velox::memory diff --git a/velox/common/memory/MemoryPool.h b/velox/common/memory/MemoryPool.h index a7676bb08191..2e3ac5c6f110 100644 --- a/velox/common/memory/MemoryPool.h +++ b/velox/common/memory/MemoryPool.h @@ -687,6 +687,10 @@ class MemoryPoolImpl : public MemoryPool { return allocator_; } + void testingCheckIfAborted() const { + checkIfAborted(); + } + uint64_t testingMinReservationBytes() const { return minReservationBytes_; }