tustvold commented on code in PR #6932:
URL: https://github.com/apache/arrow-datafusion/pull/6932#discussion_r1267408804


##########
datafusion/execution/src/memory_pool/mod.rs:
##########
@@ -221,6 +219,49 @@ pub fn human_readable_size(size: usize) -> String {
     format!("{value:.1} {unit}")
 }
 
+/// Tracks the change in memory to avoid overflow. Typically, this
+/// is isued like the following
+///
+/// 1. Call `delta.dec(sized_thing.size())`
+///
+/// 2. potentially change size of `sized_thing`
+///
+/// 3. Call `delta.inc(size_thing.size())`
+#[derive(Debug, Default)]
+pub struct MemoryDelta {

Review Comment:
   In https://github.com/apache/arrow-datafusion/pull/7016/files#r1267407414 I 
opted to just remove the delta-based accounting as I couldn't see a compelling 
reason to keep it around, given it was computing total memory usage, and using 
this to compute deltas, in order to then update the total memory usage



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to