Skip to content

[core] Manage manifest extra file lifecycle - #9886

Merged
JingsongLi merged 1 commit into
apache:masterfrom
leaves12138:codex/manifest-sidecar-lifecycle
Sep 16, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
leaves12138:codex/manifest-sidecar-lifecycle

Conversation

@leaves12138

Copy link
Copy Markdown
Contributor

Purpose

Follow up on #9845 with manifest extra-file lifecycle management, extracted from #9743.

  • Delete an unreferenced manifest together with its explicitly recorded extra files, including custom sidecar names.
  • Use the manifest metadata when cleaning newly created manifests after a failed commit or merge; keep reused manifests intact.
  • Include extra files in snapshot/tag/changelog retention sets. Preserve shared extra files that are still referenced by retained manifests.
  • Keep orphan cleanup based on explicit references rather than names inferred from a manifest suffix.

This change uses the existing _EXTRA_FILES field. It does not introduce new table options, enable sidecar generation, change the file format, or add scan pruning. Writer and reader integration remain follow-ups.

Tests

Java 8: 159 tests passed with Checkstyle and Spotless enabled.

Coverage includes metadata round-trips, deletion of only explicitly referenced files, shared-file retention, failed delta/changelog/merge commit cleanup, snapshot and tag retention, orphan cleanup, and existing manifest rewrite failures.

mvn -B -ntp -nsu -pl paimon-codegen-loader -am -DskipTests package
mvn -B -ntp -nsu -pl paimon-core -am -DwildcardSuites=none -DfailIfNoTests=false -Dflink.forkCount=2 \
  -Dtest=ManifestSidecarLifecycleTest,ManifestFileTest,ManifestFileMetaSerializerTest,ManifestRewriteCleanupTest,ExpireSnapshotsTest,LocalOrphanFilesCleanTest test

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit c872898 into apache:master Sep 16, 2026
16 of 17 checks passed
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.

2 participants