Describe the bug
The memory acquired by CometMemoryPool.grow may be less than the actual request, so CometMemoryPool.shrink may release more memory than acquired memory.
|
self.acquire(additional) |
|
.unwrap_or_else(|_| panic!("Failed to acquire {} bytes", additional)); |
|
self.used.fetch_add(additional, Relaxed); |
We may have two improvement options:
- Check acquired memory when CometMemoryPool grows: #1732 (I prefer this one)
- Add an acquired counter to avoid releasing more unacquired memory : #1731
Steps to reproduce
No response
Expected behavior
No response
Additional context
No response
Describe the bug
The memory acquired by
CometMemoryPool.growmay be less than the actual request, soCometMemoryPool.shrinkmay release more memory than acquired memory.datafusion-comet/native/core/src/execution/memory_pools/unified_pool.rs
Lines 93 to 95 in 25e39ab
We may have two improvement options:
Steps to reproduce
No response
Expected behavior
No response
Additional context
No response