This is an automated email from the ASF dual-hosted git repository.
comphead pushed a commit to branch branch-53
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/branch-53 by this push:
new 604bc336c3 [branch-53] fix: use try_shrink instead of shrink in
try_resize (#20424) (#20890)
604bc336c3 is described below
commit 604bc336c3a7a7e9caaf1ae30c35ca1bffc234a6
Author: Andrew Lamb <[email protected]>
AuthorDate: Thu Mar 12 11:48:23 2026 -0400
[branch-53] fix: use try_shrink instead of shrink in try_resize (#20424)
(#20890)
- Part of https://github.com/apache/datafusion/issues/19692
This PR:
- Backports https://github.com/apache/datafusion/pull/20424 from
@ariel-miculas to the branch-53 line
Co-authored-by: Ariel Miculas-Trif <[email protected]>
---
datafusion/execution/src/memory_pool/mod.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/datafusion/execution/src/memory_pool/mod.rs
b/datafusion/execution/src/memory_pool/mod.rs
index 0b4eb3786f..a544cdfdb0 100644
--- a/datafusion/execution/src/memory_pool/mod.rs
+++ b/datafusion/execution/src/memory_pool/mod.rs
@@ -434,7 +434,9 @@ impl MemoryReservation {
let size = self.size.load(atomic::Ordering::Relaxed);
match capacity.cmp(&size) {
Ordering::Greater => self.try_grow(capacity - size)?,
- Ordering::Less => self.shrink(size - capacity),
+ Ordering::Less => {
+ self.try_shrink(size - capacity)?;
+ }
_ => {}
};
Ok(())
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]