You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Append compaction outputs compacted again before PrepareCommit() are both added and deleted in the commit #608
Create a fixed-bucket append table with compaction enabled, e.g. compaction.min.file-num = 2.
Write enough data files to one bucket that, before the next PrepareCommit(), a compaction output is compacted again, e.g. [a, b] -> i, then [i, c] -> o.
Call PrepareCommit().
What doesn't meet your expectations?
AppendOnlyWriter::TrySyncLatestCompaction() appends every compaction result to compact_before_ and compact_after_, so the increment holds before = [a, b, i, c] and after = [i, o]: the intermediate file i is both added and deleted by the same commit, although it was never handed to a committer.
Expected before = [a, b, c] and after = [o], with i deleted directly. Paimon Java does this in AppendOnlyWriter#updateCompactResult: an input found in compactAfter is removed from it and its files are deleted.
Anything else?
Code: src/paimon/core/append/append_only_writer.cpp, AppendOnlyWriter::TrySyncLatestCompaction(). Only append compaction rewrites files, so this applies to append-only writers.
Activity