Skip to content

fix(iceberg): reject position delete row ordinal overflow - #30449

Merged
mergify[bot] merged 4 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/30431-iceberg-row-ordinal-overflow-business-20261017
Oct 18, 2026
Merged

mergify[bot] merged 4 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/30431-iceberg-row-ordinal-overflow-business-20261017

Conversation

@MatrixAdventurer

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • BUG
  • Test and CI

Which issue(s) this PR fixes:

Fixes #30431

What this PR does / why we need it:

  • Validate Iceberg position-delete ordinal bounds before generating a mask or the exported RowOrdinals sequence.
  • Detect negative bases and start + count - 1 overflow (up to MaxInt64) using subtraction, instead of wrapping to negative and silently retaining rows that should have been deleted.
  • Return ICEBERG_METADATA_INVALID without allocating or updating the position-delete mask. The helper RowOrdinals now returns ([]int64, error); repository-wide code search found only an in-package test caller, which was updated.
  • Cover overflowing/negative bases, valid upper boundary, and original normal case; no data format changes.

Verification

  • Upstream main at aa4b6eddfdad54d11be6fd75a5675eb9801f6690; commit ahead 1 / behind 0; 2 touched files.
  • Executed isolated Go control-flow reproduction on Go 1.23.2: pre-fix returned [MaxInt64-1, MaxInt64, MinInt64] with no error and failed regression; guarded implementation passed overflow and valid boundary tests (2/2).
  • New package-level tests committed, but full repository go test, native/CGo gates and independent review pending due to inaccessible clone and required Go toolchain. Draft PR; not ready to merge.

由 LW 授权的 ChatGPT Business 智能体提交。

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

MOI agent follow-up (由LW授权的MOI智能体提交)

UT completion readback at 2026-10-17T03:08Z (run 38994745165): UT Coverage on Ubuntu/x86 ✅ (02:26:44→02:54:47Z). Both compose e2e jobs — multi cn e2e bvt test docker compose(PROXY) and multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC) — were still in_progress at read time, so the run's final status is not yet judged; no failure observed among completed jobs so far this run. No merge/close/retarget actions; the remaining e2e jobs will be re-checked next window.

@XuPeng-SH
XuPeng-SH marked this pull request as ready for review October 17, 2026 03:37
@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 →

Fail fast on out-of-range position mask and RowOrdinals bounds instead of
silently wrapping past MaxInt64. Preserve the exact maximum valid boundary.

由 LW 授权的 ChatGPT Business 智能体提交。
@XuPeng-SH
XuPeng-SH force-pushed the fix/30431-iceberg-row-ordinal-overflow-business-20261017 branch from 96e959e to 03e7f56 Compare October 18, 2026 12:51
@XuPeng-SH

Copy link
Copy Markdown
Contributor

本轮维护更新:rebase 到 main 799523418e9f941afd65cd440d24e7fa0003a35e,新提交 03e7f56fa154593049283196a0d7ff70e135adb2。

仅 rebase。原 CI 的跨 CN REVOKE/prepared DELETE 和 published_views 清理超时未确定与本 PR 有关,未修改权限或超时语义。

本地验证:受影响路径的普通 UT、单轮 race 和完整变更 Go 包范围的增量 SCA 均通过。未运行整套 CI/BVT、GPU 或性能负载;不将历史作者记录标作本轮新运行。

变更保留检查覆盖完整原 PR 与 main 的集成结果;仅保留本轮明确说明的维护增量。新提交的 GitHub CI 结果待运行,原 CI 中未定位或未归因的失败仍需单独跟踪。

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

MOI agent follow-up (由LW授权的MOI智能体提交)

Readback at 2026-10-18T16:34Z on latest head 99aeeb3aaae7b15ab547ef2845401f4727899900:

  • No requested changes and 0 inline review comments; the mo-bot APPROVE (14:14Z, commit 03e7f56) still covers the unchanged two-file delta (delete_apply.go, delete_apply_test.go) on the current head.
  • The 14:39Z Mergify dequeue (workflow-file update permission) was resolved by maintainer-side manual main merges into the head branch (2df32a1 15:41Z, 99aeeb3 16:27Z), matching Mergify's own hint. No action needed from this agent; no @mergifyio queue repost to avoid bypassing rule evaluation.
  • CI run 39145068619 (run_number 59615, head 99aeeb3) started 16:28Z and was in_progress at read time (UT Coverage on Ubuntu/x86 running); the run's final conclusion is not yet judged. A couple of jobs showed skipped and the rest were pending/queued at read time — no failure observed so far this run.
  • No merge/close/retarget performed by this agent. Next window: check the final conclusion of run 39145068619 and whether the merge queue re-entered automatically under rule Automatic queue on approval for main.

@mergify

mergify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-18 17:16 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-10-18 19:00 UTC · at 7b911aea687455af8788af07eb65952f1eda5796 · squash

This pull request spent 1 hour 44 minutes 25 seconds in the queue, including 49 minutes 37 seconds running CI.

Required conditions to merge

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

MOI agent follow-up (由LW授权的MOI智能体提交)

Readback at 2026-10-18T18:34Z (no code change this round):

  • Head 0fd10760336bd95aa0954f86a1798354cd570b7f, base main @ f11dd8c5d700f215922835f314ea18d32471f482; only merge-of-main commits added since 03e7f56f — authored by XuPeng-SH via web-flow (15:41:59Z 2df32a10, 16:27:14Z 99aeeb3a) and one by mergify[bot] (18:10:27Z 0fd10760). No new commits from this agent.
  • Review: mo-bot-xupeng recorded approve on 03e7f56f (14:14:55Z); no unresolved review threads (Mergify: #review-threads-unresolved = 0).
  • Queue: after the 14:39Z dequeue (queue could not update the branch containing .github/workflows/iceberg-connector.yml without workflows permission), the branch was brought up to date as above and the pull re-entered the main queue at 17:16:34Z — "Automatic queue on approval for main". Mergify Merge Protections = neutral; remaining condition only CI Required; Mergify ETA 19:07 UTC.
  • CI on head 0fd1076 (run 39152944181) at read time: UT Coverage on Ubuntu/x86, multi cn e2e bvt test docker compose(PROXY) and multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC) in_progress; other matrix jobs skipped/neutral per queue policy; no failure observed among completed jobs so far this run.
  • No action taken or needed by this agent: approval + queue are proceeding automatically. Not merging, not closing. Will re-check next window only if terminal CI/queue events warrant it; if merged by then, no further comment is planned.

@mergify
mergify Bot merged commit 7b911ae into matrixorigin:main Oct 18, 2026
30 of 31 checks passed
@mergify mergify Bot removed the queued label Oct 18, 2026

This branch was successfully deployed

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

Labels

kind/bug Something isn't working kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: position delete mask wraps row ordinals past MaxInt64 instead of erroring

3 participants