[spark] Externalize oversized input partition metadata - #10041
JustinBinber wants to merge 1 commit into
Conversation
3d3bc64 to
ad97519
Compare
|
Requirement fit: PIVOT (triage: NO-GO for this PR as scoped) Issue #10021 reports Driver OOM or restart around split discovery, task construction, and serialization. This PR only shrinks the serialized Spark For this roughly 1,700-line change, the new shared staging path, serialization format, extra encoding pass, and file/broadcast cleanup lifecycle need a demonstrated end-to-end capacity benefit. Please provide a reproducible SQL workload that completes planning but fails specifically at task transport, then show it completes with this option enabled, including peak Driver/Executor memory and runtime at a representative file count. Alternatively, pivot to the planning or decode boundary that blocks the reported workload. I am closing this PR for now; it can be reconsidered with that evidence and a narrower implementation. |
Part of #10021.
Purpose
Spark currently embeds every Paimon
Splitin anInputPartition. For scans with many file descriptors, the serialized task payload can become large enough to put pressure on driver memory, RPC, retries, and speculation.This PR adds an opt-in transport path for oversized input partition metadata. Small partitions keep the existing inline behavior. Large partitions are written to a shared seekable
FileIOcontainer, while Spark tasks carry only a compact descriptor and read their own byte range on the executor.Changes
Scope
This PR only bounds the metadata carried by Spark tasks. It does not yet make driver-side split planning streaming, stream split decoding on executors, or split one exceptionally large
DataSplit. Those are intentionally left as separate follow-up changes discussed in #10021.Validation
SparkReadITCasegit diff --checkA metadata-only probe with 350
DataSplits and 1,000 file descriptors per split reduced the serializedInputPartitionpayload from about 136.5 MB to a small descriptor. The full metadata remains in the external container; this result demonstrates task-payload reduction, not an end-to-end scan speedup.