Visitar URL original
[core] Repeated append-only compaction retains intermediate files by taoran92 · Pull Request #10448 · apache/paimon · GitHub
Skip to content

[core] Repeated append-only compaction retains intermediate files - #10448

Merged
JingsongLi merged 1 commit into
apache:masterfrom
taoran92:fix/append-only-repeated-compaction
Oct 9, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
taoran92:fix/append-only-repeated-compaction

Conversation

@taoran92

@taoran92 taoran92 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Purpose

Closes #10447.

Repeated append-only compaction before prepareCommit retains intermediate files in both compactBefore and compactAfter. For example, A + B + C -> X followed by X + D + E -> Y emits both DELETE and ADD entries for X, which can fail manifest merging.

Track pending compaction files by file name and remove outputs consumed by a later compaction from the pending results. Delete those intermediate data files and their extra files, while preserving files already handed to a committer by an earlier prepareCommit.

Tests

Added AppendOnlyWriterTest#testRepeatedCompaction, covering repeated compaction with and without an intervening prepareCommit. It checks the compaction increments, intermediate data and extra-file cleanup, preservation of files handed to a committer, and manifest merging to the final output.

@taoran92 taoran92 changed the title [core] Repeated append-only compaction retains intermediate files (#10447) [core] Repeated append-only compaction retains intermediate files Oct 8, 2026
Clean up intermediate compaction outputs while preserving files already handed to a committer.
@taoran92
taoran92 force-pushed the fix/append-only-repeated-compaction branch from 0fe3435 to 4d6a2f6 Compare October 9, 2026 08:51
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 02302d8 into apache:master Oct 9, 2026
18 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.

[Bug] Repeated append-only compaction retains intermediate files

2 participants