Skip to content

[Bug] Failed or cancelled append compaction rewrite leaves its output files behind #610

Backlog

Description

@SteNicholas

Search before asking

  • I searched in the issues and found nothing similar.

Paimon-cpp version

main (786badf)

Minimal reproduce step

  1. Create a fixed-bucket append table with read.preparation-window = 1 and two data files in one bucket.
  2. Run AppendOnlyFileStoreWrite::CompactRewrite() on both files, and make it fail or get cancelled after the rows of the first file were written to the output, e.g. by failing the deletion vector lookup of the second file or cancelling the CancellationController at that point.
  3. List the bucket directory.

What doesn't meet your expectations?

On failure or cancellation, the scope guard in CompactRewrite() calls rewriter->Close(), which completes the current output file and keeps the files already rolled. The rewrite returns an error, so these outputs are never returned to a committer and remain as orphan files.

Expected the guard to call rewriter->Abort(), deleting the open file and the closed ones, and to keep the guard until GetResult() succeeds.

Anything else?

Code: src/paimon/core/operation/append_only_file_store_write.cpp, AppendOnlyFileStoreWrite::CompactRewrite().

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added
    bug
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions