[WIP] Fix Iceberg metadata caching and S3 connection reuse [databricks] #16854
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 419 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.361
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #16854"
general
weight: 0.35
gerashegalov
Related issue: N/A.
Description
Some Iceberg Parquet footer and dictionary reads bypass PerfIO and use synchronous S3 streams. Seeking or closing with unread response bytes discards connections even though the clients are cached. Iceberg 1.6/1.9 also bypass the footer cache, and scan setup discards known file sizes, causing redundant HEAD requests.
This change:
Validation
Local validation used JDK 17 . All 52 focused test executions passed, with no skipped or canceled tests:
| Spark | Iceberg | Focused tests passed |
| --- | --- | ---: |
| 3.5.0 | 1.6.1 | 10 |
| 3.5.9 | 1.9.2 | 14 |
| 3.5.9 | 1.10.1 | 14 |
| 4.1.1 / Scala 2.13 | 1.11.0 | 14 |
Coverage includes
IcebergS3InputFileSuite,GpuParquetIOSuite, and, on the newer profiles,GpuMultiThreadIcebergParquetReaderSuite: known-length forwarding, backward seeks, EOF, failed refills and cleanup, footer-cache hits without additional source reads, split filtering, dictionary contents, and CPU/GPU result parity with both coalescing and multithreaded readers. The scan tests assert GPU execution.Committed-head shim source selection passed against current main across 33 profiles. The bounded cross-PR advisory found no new static interaction findings in its five checked combinations; remaining candidates were outside that check limit.
Performance measurements
A local HTTP/1.1 S3 endpoint served ten copies of the checked-in
file-splits.parquetfixture using AWS SDK 2.31.78. The dictionary stress case reads columns in reverse order. The baseline uses native Iceberg synchronous metadata reads; the changed path uses PerfIO with Netty.| Scenario | HEAD requests, before → after | GET requests, before → after | TCP connections, before → after |
| --- | ---: | ---: | ---: |
| Footer reads | 10 → 0 | 20 → 20 | 10 → 1 |
| Footer and dictionary reads | 10 → 0 | 2,260 → 30 | 2,250 → 1 |
Both dictionary runs read 2,330 pages with matching checksums. These measurements cover request and connection counts; representative remote-storage throughput validation remains pending.
Remaining draft work
AI assistance: Codex assisted with implementation, tests, and PR preparation. The author reviewed the implementation diff before publication.
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance