Repository navigation
feat(table): support incremental deduplicate compaction - #1253
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Follow-up to #1252, extracted from #1251. Small writes to a deduplicate primary-key table currently cause compaction to rewrite the captured bucket, including large historical files. Incremental sorted-run selection now leaves large higher-level runs in place and rewrites only the selected runs.
This PR enables the policy for
merge-engine=deduplicatewithchangelog-producer=none/inputand no deletion vectors. Other modes retain their merged behavior while their lookup/cache dependencies are split separately.Brief change log
Tests
4,663 library unit tests and 159 related integration tests passed; six existing unit tests were ignored. The integration run covers all 60 PK compaction tests plus append/Data Evolution compaction, DV writes, incremental/streaming reads and partial-update state.
Eight new planner tests cover stable run grouping/order, Java threshold boundaries, normal-maintenance precedence over forced L0 progress, large-run double rounding, singleton/empty inputs, existing high levels, large-byte arithmetic and configuration bounds. Six new integration tests cover untouched history files, data and system-sequence equivalence, historical snapshots, user-sequence winners, tombstones, tampered tasks/results, incorrect physical output levels, concurrent L0 appends, task-independent publication and retry recovery (with both retained and merged history), and the aggregation scope boundary.
cargo fmt --all -- --check,git diff --check, andcargo clippy --locked -p paimon --lib --test pk_compact_test -- -D warnings -A clippy::nonminimal_boolpassed. The Clippy allowance covers existing repository findings with the local toolchain.Selection was checked against Java
UniversalCompaction,LevelsandCoreOptionsat Apache Paimon commit5be7e2dd1f.API and Format
Adds a defaulted
output_levelfield directly to serializedCompactTaskobjects. Table data formats are unchanged. No full-compaction option is added.Documentation
Updated the compaction guide with the enabled modes, run-selection options, output levels and serialized-task recovery behavior.