Skip to content

[core] Clean up index files on aborted commits#8572

Open
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:fix-abort-index-cleanup
Open

[core] Clean up index files on aborted commits#8572
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:fix-abort-index-cleanup

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

FileStoreCommitImpl.abort deleted uncommitted data and changelog files but ignored newIndexFiles from both data and compact increments. Aborted commits could therefore leave index files behind, including files stored at external paths.

Clean up both sets of new index files through IndexFilePathFactories. Keep deletedIndexFiles untouched because they still belong to the active snapshot when the commit is aborted.

Tests

  • mvn -pl paimon-core -Pfast-build -DwildcardSuites=none -Dtest=FileStoreCommitTest test
  • mvn -pl paimon-core -DskipTests verify

FileStoreCommitImpl.abort cleaned newly written data and changelog files but ignored index files carried by data and compact increments. Aborted writes could therefore leave uncommitted index files behind, including files stored at external paths.

Delete both sets of new index files through the partition and bucket aware index path factory while preserving deleted index files. Add regression coverage for data and compact increments, external paths, and retained deleted index files.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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.

1 participant