Repository navigation
fix(parquet): Harden Thrift decoding of binary lengths and collection counts - #12142
Conversation
|
run benchmark metadata |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing parquet-metadata-decoder-hardening (963e92f) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing parquet-metadata-decoder-hardening (963e92f) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-1jhkfv09-ce9223d7-wpng Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmark metadata |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing parquet-metadata-decoder-hardening (963e92f) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing parquet-metadata-decoder-hardening (963e92f) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-1fgd6drw-c70f956b-vh99 Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmark metadata |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing parquet-metadata-decoder-hardening (464816c) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
run benchmark metadata |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing parquet-metadata-decoder-hardening (464816c) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing parquet-metadata-decoder-hardening (464816c) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-j7bno9ag-e46c3af9-c4d8 Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing parquet-metadata-decoder-hardening (464816c) to 30c5c32 (merge-base) diff Run configurationrun benchmark metadata
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-1afkvotn-f5396a58-n5sn Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmark metadata baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing 464816c (464816c) to 963e92f diff Run configurationrun benchmark metadata
baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
run benchmark metadata baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing 464816c (464816c) to 963e92f diff Run configurationrun benchmark metadata
baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing 464816c (464816c) to 963e92f diff Run configurationrun benchmark metadata
baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-1mg5tked-7d8245a9-k8xj Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing 464816c (464816c) to 963e92f diff Run configurationrun benchmark metadata
baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-1mg5tked-7d8245a9-pr5x Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmark metadata baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing 464816c (464816c) to 963e92f diff Run configurationrun benchmark metadata
baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing 464816c (464816c) to 963e92f diff Run configurationrun benchmark metadata
baseline:
ref: 963e92fae89e47054f9cae9053ffdda3dde92eaa
changed:
ref: 464816c51fdc815b733fe22616ce821654813adc
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-1ezi61a7-c3ad28b6-5tgc Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
464816c to
977137d
Compare
|
run benchmark metadata baseline:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
changed:
ref: 977137d60ee54236e591d917107395cfd77331a4 |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing 977137d (977137d) to 275adb2 diff Run configurationrun benchmark metadata
baseline:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
changed:
ref: 977137d60ee54236e591d917107395cfd77331a4
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
run benchmark metadata baseline:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
changed:
ref: 977137d60ee54236e591d917107395cfd77331a4 |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing 977137d (977137d) to 275adb2 diff Run configurationrun benchmark metadata
baseline:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
changed:
ref: 977137d60ee54236e591d917107395cfd77331a4
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing 977137d (977137d) to 275adb2 diff Run configurationrun benchmark metadata
baseline:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
changed:
ref: 977137d60ee54236e591d917107395cfd77331a4
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-mi8iqi2p-b2e82684-sgfr Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing 977137d (977137d) to 275adb2 diff Run configurationrun benchmark metadata
baseline:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
changed:
ref: 977137d60ee54236e591d917107395cfd77331a4
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-re2f7uj5-3e952da4-skmz Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmark metadata baseline:
ref: 977137d60ee54236e591d917107395cfd77331a4
changed:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing 275adb2 (275adb2) to 977137d diff Run configurationrun benchmark metadata
baseline:
ref: 977137d60ee54236e591d917107395cfd77331a4
changed:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
run benchmark metadata baseline:
ref: 977137d60ee54236e591d917107395cfd77331a4
changed:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing 275adb2 (275adb2) to 977137d diff Run configurationrun benchmark metadata
baseline:
ref: 977137d60ee54236e591d917107395cfd77331a4
changed:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-ez8gwx9u-a9459978-zn7v Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Benchmark starting (GKE) | trigger Target: metadata Sharding factor: 1 (1 workers). Comparing 275adb2 (275adb2) to 977137d diff Run configurationrun benchmark metadata
baseline:
ref: 977137d60ee54236e591d917107395cfd77331a4
changed:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
shards: 1
Results will be posted when all workers finish. File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Target: metadata Comparing 275adb2 (275adb2) to 977137d diff Run configurationrun benchmark metadata
baseline:
ref: 977137d60ee54236e591d917107395cfd77331a4
changed:
ref: 275adb2c0cf3cd2cccf386c0591126a56ada7f1f
shards: 1
DetailsPer-runner informationmetadata — shard 1/1Node: gk3-benchmark-cluster-nap-ez8gwx9u-a9459978-zn7v Instance: c4a-highmem-16 (12 vCPU / 65 GiB) uname: BENCH_COMMAND: cargo bench --features=arrow,async,test_common,experimental,object_store --bench metadataCPU Details (lscpu)Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
977137d to
ffa5a3d
Compare
| let size = list_ident.size as usize; | ||
| check_list_size(prot.remaining_bytes(), size)?; | ||
| let mut page_locations = Vec::with_capacity(size); |
There was a problem hiding this comment.
No existing issue for this change. I just thought I'd fix it along with the others.
| let list_ident = prot.read_list_begin()?; | ||
| validate_list_type(ElementType::Struct, &list_ident)?; | ||
| let mut page_locations = Vec::with_capacity(list_ident.size as usize); | ||
| let size = list_ident.size as usize; |
There was a problem hiding this comment.
should we use try_into for this conversion (as usize it 32 bits on wasm, etc)?
There was a problem hiding this comment.
read_list_begin already guarantees the conversion is safe. I'll add a comment to that effect.
…length ThriftReadInputProtocol::read_bytes_owned, which reads a stream-backed page header's binary statistics, sized its vector by the declared length with Vec::with_capacity, so a length too large to allocate aborted the process, and returned a short vector when the input ended early. It now reserves at most 8 KiB up front, grows with the bytes it reads, and fails when fewer bytes than declared remain, as upstream does since apache#12142. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018zkiLHRETaEooWKYVSAV3L
Which issue does this PR close?
decode_metadatareserves memory from unvalidated footer counts (row groups,num_children) #11954binaryreads reserveVec::with_capacity(len)from an unchecked length #12100Rationale for this change
There are some bits of the Thrift decoder that can either over-allocate or silently return corrupt data when given malformed input. I'm choosing to address them as a single PR to keep performance issues at a minimum.
What changes are included in this PR?
Are these changes tested?
Yes
Are there any significant user-facing changes?
No
AI disclosure
An AI agent was used in the development and testing of this PR.