Skip to content

fix(iceberg): handle fragmented signed HTTP range reads - #27204

Merged
mergify[bot] merged 4 commits into
matrixorigin:mainfrom
iamlinjunhong:m-27196
Aug 17, 2026
Merged

mergify[bot] merged 4 commits into
matrixorigin:mainfrom
iamlinjunhong:m-27196

Conversation

@iamlinjunhong

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #27196

What this PR does / why we need it:

fix(iceberg): handle fragmented signed HTTP range reads

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking regression gap: please cover the actual Parquet consumer path, not only the private FileService boundary.

The reported failure in #27196 is parquet.OpenFile -> icebergObjectReaderAt -> ProviderObjectReader -> signedHTTPFileService, but the new regression only calls signedHTTPFileService.Read with arbitrary bytes. It never opens a Parquet footer, never proves the ReaderAt contract, and the PR's Iceberg E2E Local check is skipped. Therefore this test can pass while the user-visible Spark/Iceberg query remains broken (for example, due to an integration mismatch immediately above this helper). The issue itself also explicitly asks for a deterministic one-row Spark/Iceberg regression.

Please add at least a deterministic generated-Parquet test that serves range responses in multiple fragments, reads it through ProviderObjectReader/icebergObjectReaderAt, and successfully executes parquet.OpenFile or readParquetRowGroupFooters; ideally also add/run the one-row Spark-generated Iceberg fixture from the issue. Keep the truncated-range control.

I verified the implementation independently: the same fragmented known-length request fails on base b7125edc with the misleading 512 MiB error and passes on a35e2635; a local generated-Parquet harness through the full ReaderAt chain also fails on base and passes on this head. Package list/build/vet/unit tests, the dependent pkg/iceberg/metadata suite, and focused race tests pass. The code change looks correct; the blocker is committing regression evidence at the externally visible boundary so this fix remains closed.

@iamlinjunhong

Copy link
Copy Markdown
Contributor Author

已处理本轮 review 与 CI 失败。

  • 回归覆盖现在经过 parquet.OpenFile -> icebergObjectReaderAt -> ProviderObjectReader -> signedHTTPFileService,以生成的宽 Parquet 和 4 KiB 分段 HTTP range 响应验证 footer 可读;保留底层已知长度分段与截断控制。
  • 将该测试 transport 的两个裸 errors.New 改为 api.NewError,修复 TestIcebergPackagesUseMOErrorAndCauseAwareTimeouts。
  • 本地受控 CGo 验证通过:pkg/iceberg/{io,metadata,api} owning-package tests、build、vet。

新 head:43f9c4c8b9462e4ed9ef9d846157e840b8e58dd2,新 CI 已触发。

@iamlinjunhong

Copy link
Copy Markdown
Contributor Author

@XuPeng-SH 已核对该 blocking feedback 已由当前 head 43f9c4c8b9462e4ed9ef9d846157e840b8e58dd2 的 test(iceberg): satisfy signed parquet regression boundary 覆盖。

新增 TestLocalScanPlannerReadsFragmentedSignedParquetFooterThroughProvider 生成宽 Parquet,并经 parquet.OpenFile → icebergObjectReaderAt → ProviderObjectReader → signedHTTPFileService 读取 footer;HTTP transport 每次最多返回 4 KiB,同时断言实际请求超过该分段。底层已知长度分段及截断控制仍保留在 pkg/iceberg/io。

在该 exact head 的受控 CGo 环境中已重新通过:

  • go build -mod=readonly ./pkg/iceberg/io ./pkg/iceberg/metadata
  • go vet -mod=readonly ./pkg/iceberg/io ./pkg/iceberg/metadata
  • .agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=120s ./pkg/iceberg/io ./pkg/iceberg/metadata

请基于当前 head 重新 review。

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep re-review on exact head 43f9c4c found no blocking issue. The known-length path is bounded before allocation by both the configured 512 MiB ceiling and the remaining IOVector materialization budget, allocates once, and uses io.ReadFull so legal fragmented HTTP bodies no longer trip the conservative growth-peak guard. Unknown-length reads retain ReadAllBounded; ignored-Range 200 responses remain offset/length bounded; truncated known-length responses still fail with UnexpectedEOF and close the body. The committed regression now traverses parquet.OpenFile -> icebergObjectReaderAt -> ProviderObjectReader -> signedHTTPFileService with a range larger than the 4 KiB transport fragment. On the exact worktree, focused fragmented/truncated/budget tests and the full Parquet consumer test passed 10/10, both passed under race 10/10, owning packages build/vet cleanly, and diff --check is clean.

@mergify mergify Bot added the queued label Aug 17, 2026
@mergify

mergify Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-08-17 09:22 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-08-17 10:42 UTC · at 90397cf8730c1f39fa45c6698845abdcf90b9c28 · squash

This pull request spent 1 hour 20 minutes 24 seconds in the queue, including 1 hour 1 minute 38 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Linux/arm64
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)

@mergify
mergify Bot merged commit 0d7ad8b into matrixorigin:main Aug 17, 2026
26 of 27 checks passed
@mergify mergify Bot removed the queued label Aug 17, 2026
@iamlinjunhong
iamlinjunhong deleted the m-27196 branch August 23, 2026 17:14
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…#27204)

fix(iceberg): handle fragmented signed HTTP range reads

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…#27204)

fix(iceberg): handle fragmented signed HTTP range reads

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…#27204)

fix(iceberg): handle fragmented signed HTTP range reads

Approved by: @XuPeng-SH

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants