dwsmith1983 commented on code in PR #5568:
URL: https://github.com/apache/datafusion-comet/pull/5568#discussion_r3900487138


##########
native/shuffle/src/writers/local/local_partition_writer.rs:
##########
@@ -53,6 +53,11 @@ enum DataOutput {
         spill_writers: Vec<SpillWriter>,
         /// Runtime used to allocate the temporary spill files.
         runtime: Arc<RuntimeEnv>,
+        /// Byte buffer recycled through the short-lived per-partition 
`BufBatchWriter`s.
+        /// Partitions are written strictly one at a time, so a single buffer 
keeps its
+        /// grown capacity across the whole task instead of every partition 
regrowing a
+        /// fresh allocation toward the write buffer size.
+        recycled_buffer: Vec<u8>,

Review Comment:
   All three taken: flush now ends with shrink_to(write_buffer_size), so 
retained capacity is bounded at the configured size (mid-partition the 
high-water can still reach the cap plus the largest block, same as before — 
only what is retained changed); the description is reworded to say the peak is 
retained rather than released, and now capped, instead of claiming an 
improvement; and the drained-scratch invariant is debug-asserted with a test. 
The into_buffer question dissolved with the borrow change from your other 
comment.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to