hcrosse opened a new issue, #2817:
URL: https://github.com/apache/iceberg-go/issues/2817

   ### Feature Request / Improvement
   
   When bin-pack compaction runs with `WithCompactionScanConcurrency` above 1, 
memory during scanning scales with the full size of each input file rather than 
the configured Arrow batch size.
   
   Bin-pack compaction currently reads tasks through `Scan.ReadTasks`, which 
puts batches back into input task order. Whenever an earlier task is slow to 
open or read, sibling workers keep decoding their assigned files into the 
reorder buffer until each worker hits the limit of one in-flight task. For 
large files, buffering an entire decoded file per worker can use far more 
memory than expected even when `WithCompactionArrowBatchSize` is small.
   
   Bin-pack compaction does not depend on input task order. Streaming batches 
through a bounded channel without reordering applies backpressure per batch 
instead of per file, keeps memory during scanning bounded by the worker count 
and batch size, and avoids head-of-line blocking when one file lags.
   
   Public scan methods such as `Scan.ReadTasks` and `Scan.ToArrowRecords` can 
stay ordered, while sort and Hilbert compaction stay unchanged. I have a fix 
ready to open as a PR.
   


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