Skip to content

fix: use valid Iceberg operation for rewrite snapshots - #31029

Merged
XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/00dc00b7c5924c06e67f30dbb1e4ddf8454d5af2db0ad0f41025be8c4f8aa183
Oct 25, 2026
Merged

XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/00dc00b7c5924c06e67f30dbb1e4ddf8454d5af2db0ad0f41025be8c4f8aa183

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:

#30534

What this PR does / why we need it:

Iceberg rewrite maintenance commits were serializing MatrixOne's internal procedure names (rewrite_manifests and rewrite_data_files) as the snapshot summary operation. Those values are invalid under the Iceberg table metadata specification, so strict clients such as pyiceberg could no longer load the table after a rewrite.

This changes all five snapshot-summary write boundaries for manifest and data-file rewrites to use the spec-valid replace operation while preserving the internal operation identifiers used for dispatch, verification, and result reporting. Existing summary metadata and commit behavior remain unchanged.

Validation:

  • gofmt and git diff --check pass.
  • GOWORK=off go list -mod=readonly ./pkg/iceberg/maintenance passes.
  • Focused go test and go vet were attempted but could not compile the package because the existing CGo environment cannot resolve C.mo_sorted64_build_fixed and C.mo_sorted64_free in pkg/common/docfilter/cmembership.go.

@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 →

@mergify mergify Bot added the kind/bug Something isn't working label Oct 24, 2026
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Oct 24, 2026
@XuPeng-SH

XuPeng-SH commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 9086070b61eb3a1f561245c63313ae2b472e1eb9

Review completed. Read the assessment.

@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.

mo-bot review · mo-bot-local · review

Commit: 9086070b61eb3a1f561245c63313ae2b472e1eb9

Assessment: approve

Reviewed the complete 10-file delta and affected callers. Mapping rewrite operations to replace at the existing metadata writers is a coherent fix consistent with the Iceberg specification. Internal dispatch, idempotency, verification and cleanup remain intact. No actionable defects or added runtime costs were found.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1

Validation:

  • Reconciled exact-head CI job 120984021910: its race-enabled light test stage explicitly selected maintenance, catalog, API and SQL Iceberg packages and completed with status 0. Native prerequisites were verified before execution.

  • Verified retained CI artifact 12559380486 against the SHA256 recorded in the job log. Retrieval commands, clean source fingerprints and exit receipts are retained under attempt-1/checks.

  • Audited regression assertions for native materialization, outgoing snapshot summaries, catalog planners and commit recovery. Traced both native and catalog paths through REST serialization.

  • Receipt-backed evidence audit passed: exact HEAD, unchanged checkout, supplied patch reconciliation and git diff --check. Logs and detailed analysis are retained in /home/xupeng/.local/state/mo-bot/jobs/28017a89c42bb5e463203bea/attempt-1, including evidence-audit.log and review-notes.json.

Limitations:

  • No live pyiceberg round trip was executed; Iceberg E2E Local was skipped. Boundary coverage and exact-head CI suffice for these summary-value substitutions, so native tests were not repeated locally.

  • The frozen evidence references issue #30534 without its body; review covered the behavioral contract documented in the PR.

@mergify mergify Bot added the queued label Oct 24, 2026
@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-24 21:38 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ❌ Checks failed · in-place
  • 🚫 Left the queue — 2026-10-25 01:44 UTC · at 00a2705af9f0c375d8f84f8f2c24713afc8af00e

This pull request spent 4 hours 5 minutes 43 seconds in the queue, with no time running CI.

Reason

The merge conditions cannot be satisfied due to failing checks

  • CI Required

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

This branch had an error being deployed

1 failed 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 size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants