Skip to content

Apache DataFusion SQL Query Engine

Double RawTable on grow instead of triple (#7041)

Raphael Taylor-Davies368f6e606a3c
diff --git a/datafusion/execution/src/memory_pool/proxy.rs b/datafusion/execution/src/memory_pool/proxy.rs
index 2bf485c6ee..ced977b3bf 100644
--- a/datafusion/execution/src/memory_pool/proxy.rs
+++ b/datafusion/execution/src/memory_pool/proxy.rs
@@ -84,7 +84,7 @@ impl<T> RawTableAllocExt for RawTable<T> {
Err(x) => {
// need to request more memory
- let bump_elements = (self.capacity() * 2).max(16);
+ let bump_elements = self.capacity().max(16);
let bump_size = bump_elements * std::mem::size_of::<T>();
*accounting = (*accounting).checked_add(bump_size).expect("overflow");