You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by ag...@apache.org on 2025/05/08 13:55:29 UTC
(datafusion-comet) branch main updated: Warn if memory pool is dropped with bytes still reserved (#1721)
This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new c6d615714 Warn if memory pool is dropped with bytes still reserved (#1721)
c6d615714 is described below
commit c6d615714efc984953a51f99849de44f72b5abe7
Author: Andy Grove <ag...@apache.org>
AuthorDate: Thu May 8 07:55:24 2025 -0600
Warn if memory pool is dropped with bytes still reserved (#1721)
---
native/core/src/execution/memory_pools/unified_pool.rs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/native/core/src/execution/memory_pools/unified_pool.rs b/native/core/src/execution/memory_pools/unified_pool.rs
index fc7423adc..210ae22f4 100644
--- a/native/core/src/execution/memory_pools/unified_pool.rs
+++ b/native/core/src/execution/memory_pools/unified_pool.rs
@@ -76,6 +76,15 @@ impl CometMemoryPool {
}
}
+impl Drop for CometMemoryPool {
+ fn drop(&mut self) {
+ let used = self.used.load(Relaxed);
+ if used != 0 {
+ log::warn!("CometMemoryPool dropped with {} bytes still reserved", used);
+ }
+ }
+}
+
unsafe impl Send for CometMemoryPool {}
unsafe impl Sync for CometMemoryPool {}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org