[opt](iceberg) Decouple bounded manifest loading from parsed caching #70410
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #70410"
general
weight: 0.35
morrySnow
Background
Iceberg batch scans either use a bounded completion-ordered manifest loader with the parsed Manifest Cache enabled, or SDK file planning with the cache disabled. SDK parallel file planning polls an empty output queue with a fixed 10 ms sleep.
What problem does this PR solve?
Issue Number: None
Related PR: None
PR Type: Performance
Problem Summary:
Use the existing bounded manifest loader for supported cache-disabled data scans too. Parsed-result retention only selects lookup/load functions, while admission, completion notification, cancellation and backend-demand-controlled prefetch remain shared. Preserve SDK streaming for single, oversized or unknown-count manifests and custom/offline scans.
Details
d1b11a4b513(before the review follow-up): with parsed Manifest Cache disabled, ARM64 full-SQL medians for 1000 manifests (10,000 small Parquet files) fall from 910.0 to 162.0ms for a cold single full scan, and 912.1 to 398.4ms for all four concurrent full scans to finish. Cold LIMIT falls 34.5 to 23.3ms. All 16 cold/warm LIMIT/full-scan medians are lower than the unchanged module. Cache-enabled full scans remain essentially flat; a 30-group followup measures 170.6->169.4ms for cold full scan, while warm LIMIT c4 remains 14.27->15.14ms (+0.88ms).Initial full-SQL medians at
d1b11a4b513, before the review follow-up, in ms. Parsed Manifest Cache disabled in both Doris versions:| Manifests | FE caches | SQL | Before, single | After, single | Before, 4 queries | After, 4 queries |
|---:|---|---|---:|---:|---:|---:|
| 100 | cold | LIMIT 10 | 34.7 | 25.7 | 39.5 | 29.7 |
| 100 | cold | COUNT + SUM | 127.0 | 105.4 | 286.5 | 276.7 |
| 100 | warm | LIMIT 10 | 23.2 | 12.0 | 28.9 | 16.1 |
| 100 | warm | COUNT + SUM | 110.0 | 104.0 | 263.0 | 255.0 |
| 1000 | cold | LIMIT 10 | 34.5 | 23.3 | 39.7 | 26.8 |
| 1000 | cold | COUNT + SUM | 910.0 | 162.0 | 912.1 | 398.4 |
| 1000 | warm | LIMIT 10 | 22.3 | 10.9 | 29.7 | 21.1 |
| 1000 | warm | COUNT + SUM | 897.6 | 143.5 | 902.3 | 376.8 |
Each cell is the median of 10 synchronized batches; the four-query columns measure completion of all four queries. Both versions use the same ARM64 Release BE, 6 CPUs per engine and the same 10,000 small files. Cold clears FE table/metadata/Manifest caches; BE footers and data pages stay warm. Warm retains the existing caches, with parsed Manifest caching still disabled. SQL/result caching and profiling are disabled during timing.
Testing
d1b11a4b513, not a new-head measurement: 6 JFRs and 24 Profiles: 1000-manifest SDK hasNext+sleep samples 2053 before and 0 after; BE GetSplitTime 729/722ms before and 79/75ms after. All profiles have 10000 footer hits, 20000 page hits, 50000 rows and 10000 ranges, with no new footer reads or page writes.Notes for Reviewers
The follow-up commit
03f344b6a7dbaddresses the four inline findings:SnapshotScan.planFiles()event/timer/report lifecycle around localdoPlanFiles, with manifest/file/delete counters and one report on full or early close, including historical schemas.Before the fixes, ten regression cases produced eight assertion failures and two binding exceptions. At
03f344b6a7db, the complete connector suite had 1810 tests, zero failures/errors and five existing skips; FE build/Checkstyle passed with two build CPUs. That revision also passed another 400 complete SQL result checks using the unchanged ARM64 Release BE.The follow-up commit
290bd57bacfbpreserves SDK delete-file pruning and data projection:The follow-up commit
95b02f4ce592bounds retained query metadata more closely to the work needed:The follow-up commit
41183a309266separates evaluation statistics from retained survivor metadata:The performance table above belongs to the initial implementation. Post-repair timing attempts encountered active host paging, including after equal lower-memory overrides, so those timings are excluded from fair performance claims. Fair end-to-end timing for the follow-up remains pending; native reporting/counters can have real cost.
The follow-up commit
12f4a79e161fixes reads after a metadata delete rewrites a manifest whose partition source column has already been dropped:build.sh --fe -j2and Checkstyle pass.The follow-up commit
5124eacce46fixes delete association when a manifest rewrite overlaps partition-source removal:{1,2}and an equality delete for1returns{1,2}through the previous loader, versus{2}through native SDK planning.{2}andCOUNT() = 1with cache off/on, synchronous/streaming planning and cold/warm reads. SQL/result caching is disabled. Fair performance timing remains pending; no new performance numbers are claimed.Rebase follow-up on 2026-11-19 (integration commit
d99dbb05eb7):6d697e8e044after #70675 introduced a statement-ownedIcebergManifestReaderwith the same name as this PR's stateless physical parser.IcebergManifestLoader; cached scans keep the upstream reader's leases, private-result isolation and cancellation-independent observers. Physical reads keep the SDK byte-cache isolation. Upstream encrypted-file capability/count and delete descriptor behavior is preserved.run-fe-ut.sh --run "org.apache.doris.connector.iceberg.Test"invocation passes: 1929 connector tests, zero failures/errors and five existing skips. This includes the upstream statement/encryption tests and the preceding source-removal/delete-association regressions. FE packaging and Checkstyle pass throughbuild.sh --fe -j2with BE Java extension rebuilding disabled.Second rebase follow-up on 2026-11-19 (test commit
e4626f166f7):435c387701eafter #70664 changed file splitting. Cached, uncached bounded and SDK streaming all retain the upstreamsplitFileTaskshelper and receive the request's coarse target; per-file scheduling weights use the same selected target.run-fe-ut.shand stopped its remaining reactor only after the complete Iceberg module result and matching XML reports were recorded. FE build/Checkstyle and packaging pass separately throughbuild.sh --fe -j2with BE Java extension rebuilding disabled.Release note
Supported Iceberg batch scans use bounded completion notifications even when the parsed Manifest Cache is disabled, reducing fixed polling waits while retaining early stopping and Split-buffer backpressure. Queries also remain readable after metadata deletes following historical partition-source column removal, and preserve equality/position delete association when manifest rewrites overlap removal of a partition source column.
Check List (For Author)
AI Disclosure