hcrosse opened a new pull request, #2822: URL: https://github.com/apache/iceberg-go/pull/2822
Follows #2818. Bin-pack compaction streams unordered batches across a bounded worker pool, but each Parquet `FileScanTask` still runs on a single worker. A compaction group containing one large multi-row-group file or a straggler file leaves the remaining workers idle. This PR expands multi-row-group Parquet files into internal row-group morsels across the unordered scan worker pool while keeping whole-file `FileScanTask` tracking intact for compaction replacement and delete cleanup. Each file prepares metadata, schema mapping, filters, deletes, and row-group pruning once with exact file-relative row offsets, and workers reuse their open Parquet reader across consecutive morsels of the same file. Multi-worker morselization disables nested per-column Parquet parallelism so active decoders stay bounded by the worker count. Ordered scans, non-Parquet files, single-row-group files, and `WithCompactionScanConcurrency(1)` remain unchanged. Benchmarks on Apple M4 Max (`go1.27.4`, `-count=6`, `p=0.002` for all multi-row-group rows): | Scenario | Base | PR | Delta | | --- | --- | --- | --- | | Single file (16 RG, 4 col, Zstd), c=4 | 49.33 ms | 27.11 ms | -45.1% | | Single file (16 RG, 4 col, Zstd), c=8 | 48.18 ms | 22.73 ms | -52.8% | | Narrow single file (16 RG, 2 col, Zstd), c=4 | 48.72 ms | 21.28 ms | -56.3% | | Wide single file (16 RG, 16 col, Zstd), c=4 | 128.78 ms | 85.12 ms | -33.9% | | Skewed group (1x16 RG + 7x1 RG, 4 col), c=4 | 55.55 ms | 38.11 ms | -31.4% | Uniform small-file scans (8x1 RG) stay flat (15.48 ms to 13.96 ms, p=0.132) with 7.7% fewer allocations, and 4-worker single-file scans use +28.8 MiB peak RSS (+19.5%) for concurrent decoded row-group buffers. Tested with concurrent row-group decoding checks, multiset equivalence against single-worker scans across filters, positional deletes, deletion vectors, equality deletes (including dictionary-encoded string columns across distinct row-group dictionaries), byte-range splits, v3 row lineage, reader-close error propagation, and zero-leak checked-allocator assertions under `-race`. -- 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]
