asimsedhain commented on code in PR #9015:
URL: https://github.com/apache/arrow-datafusion/pull/9015#discussion_r1487232008


##########
datafusion/execution/src/memory_pool/pool.rs:
##########
@@ -129,15 +189,14 @@ pub struct FairSpillPool {
 }
 
 #[derive(Debug)]
-struct FairSpillPoolState {
-    /// The number of consumers that can spill
-    num_spill: usize,
-
-    /// The total amount of memory reserved that can be spilled
-    spillable: usize,
+struct FairSpillPoolMember {
+    used: usize,
+    can_spill: bool,
+}
 
-    /// The total amount of memory reserved by consumers that cannot spill
-    unspillable: usize,
+#[derive(Debug)]
+struct FairSpillPoolState {
+    pool_members: HashMap<String, FairSpillPoolMember>,

Review Comment:
   Refactored out the common logic in to `SimplePool` struct (open to 
suggestions on the name).



-- 
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