Repository navigation
fix(external): avoid parquet load timeout from blob capacity - #29425
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Validation result for #29229The combined fix was validated with the same COS
Comparison with the reproduced runs:
The result is about 38% faster than the recorded baseline and about 67% faster than the budget-only experiment. The runs use the same table, COS object and load-only workflow; TKE resource/network variance means this is validation rather than a controlled per-change benchmark. The code evidence points to two contributing causes:
Focused package tests also pass: |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of all six changed files at 20cd55ebe8ba230ed821affd4db5b8f4d40d1fdc, against merge-base 932213301784bd2e3196ea66bad928aa7d4a3a3a. APPROVE: no blocking correctness, unhappy-path or engineering issue found. No subagents were used.
The direction is appropriate for this focused bug fix. Assignment capacity must not become an observed Parquet payload size. The local estimator copy preserves the catalog type and assignment checks while restoring the previous BLOB estimate. Reusing the existing prefix search for dictionary pages removes a separate row-at-a-time path. The two production files together change +24/-22 lines; no cache, worker, framework or additional long-lived state is introduced. A separate feature-design artifact is not required for this bounded repair.
| Closure | Review and QA outcome |
|---|---|
| LOAD planning | Traced source-parameter normalization, row-size fallback, estimated rows/blocks, execution-class selection and byte-based parallel sizing. All four BLOB capacity widths keep the original catalog value; text/CSV sampling and assignment enforcement remain separate. The original 31-column case reaches the expected execution class. The fallback remains an estimate, not footer cardinality. |
| Dictionary source budget | For valid decoded pages, summed prefix payload/level sizes are monotone; the lower-bound search preserves the first crossing row, empty/null behavior and progress. Checked both scalar and mixed nested/scalar consumers through mapping, rollback of overshoot, page advancement and reader cleanup. |
| Adjacent counterexample | Added a review-only independent oracle using two actual dictionary pages: required strings including empty values plus optional fixed-width integers, different offsets in each page, every available prefix and budgets 0..95. Expected sizes are computed from input values, not Page.Slice or parquetDecodedPageSize. It passes. |
| Unrelated account test edit | Inspected the complete surrounding synchronization. CREATE completion errors, concurrent gate-holder observations, writer order and cleanup assertions remain. Polling observes cross-CN catalog visibility from a separate SQL connection; it does not rerun CREATE or turn an unsuccessful CREATE into success. Keep this narrow scope explicit when describing the CI fix. |
Q1: estimator copies are call-local/GC-owned; page views do not acquire a new external cleanup owner. Existing reader/page/vector cleanup paths remain in place. Q2: the search has a finite decreasing integer interval and adds no blocking edge; error/cancel handling remains with the reader and mapper. Q3: retained batch limits and the single-oversize-row contract are unchanged; the new estimator work is proportional to column count, with no retained state.
Fresh local validation, using matching provenance-verified CGo dependencies, Go 1.26.4 and -short -tags matrixone_test -count=1: Parquet/LoadExternalStats/ApplyLoadAssignmentCasts selections pass in plan (2.614s) and external (2.359s); the independent mixed-column oracle passes (0.01s test body). The owning-package/static/public-path evidence is reused from successful current-head CI, including UT, coverage, SCA and both BVT variants.
Performance interpretation: binary search reduces the number of page-slice operations, but each dictionary prefix size still scans indices, so total work is not simply O(log rows). The reported COS run at 9494371 succeeded; its 28-minute result and percentage comparisons remain historical workload evidence, not a universal speedup or a fresh measurement of this rebased head. The intervening base also changed mixed nested/scalar reading, which was included in the current source tracing and focused tests.
There are no prior human reviews or inline threads to close on this PR. Non-blocking cleanup: consolidate the root-level issue-29229-analysis.md into final problem/decision/evidence documentation; it currently retains experiment history. Long-term footer-derived statistics can be handled separately without expanding this fix.
Review-only QA sources/logs are retained under /private/tmp/mo-review-29291-29425.q67o1N/. No PR source or test changes were submitted.
Merge Queue Status
This pull request spent 3 minutes 58 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #29229
What this PR does / why we need it:
Validation:
go test ./pkg/sql/plan ./pkg/sql/colexec/external -run 'Test.*(Parquet|LoadExternalStats|ApplyLoadAssignmentCasts)' -count=19494371491: the one-year Parquet LOAD DATA completed successfully in about 28 minutes, with 1 passed table and 0 failed tables.