Skip to content

feat(table): add manifest compaction API - #857

Closed
jianguotian wants to merge 4 commits into
apache:mainfrom
jianguotian:codex/compact-manifest-api
Closed

jianguotian wants to merge 4 commits into
apache:mainfrom
jianguotian:codex/compact-manifest-api

Conversation

@jianguotian

Copy link
Copy Markdown
Contributor

Purpose

Expose explicit manifest maintenance before making that maintenance force one global sort. This mirrors the pre-full-sort compact_manifest behavior in Java Paimon.

Changes

  • add TableCommit::compact_manifests()
  • force maintenance compaction thresholds without mutating stored table options
  • commit a metadata-only COMPACT snapshot only when the manifest set changes
  • preserve record counts, index manifest, watermark, statistics, properties, and next RowID
  • retry optimistic snapshot conflicts with the table's configured retry policy
  • compact legacy unsorted manifests as well as the sorted path
  • eliminate cross-manifest ADD/DELETE pairs and keep repeated maintenance idempotent

Merge order

Merge after #856. The next PR will make this API request an explicit global full sort, matching apache/paimon#9802.

Verification

  • cargo fmt --check
  • cargo test -p paimon --lib — 2,849 passed, 2 ignored
  • cargo clippy -p paimon --lib --tests -- -D warnings -A clippy::unnecessary-cast
  • dedicated tests for COMPACT snapshot publication, active-file preservation, delete elimination, empty delta manifests, and idempotence

Related Java work

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant