Uh oh!
There was an error while loading. Please reload this page.
branch-4.1:[fix](external-write) Delete the actual data file on write failure toavoid orphan files (#64678) - #66156
Merged
yiguolei merged 2 commits intoAug 13, 2026
Conversation
… avoid orphan files (apache#64678) When a partition writer fails to close (e.g. hdfs sync error), it cleans up the partial file using `_file_name`, but the file is actually created with `_get_target_file_name()` ("{_file_name}-{_file_name_index}{ext}"). The mismatched path makes the cleanup a no-op, leaving an orphan data file on the storage. Use `_get_target_file_name()` for the deletion so it matches the created path, for both the Iceberg and Hive partition writers. (cherry picked from commit 5db03a4)
hello-stephen
commented
Jul 28, 2026
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
hubgeter
commented
Jul 30, 2026
ContributorAuthor
run buildall |
hello-stephen
commented
Jul 31, 2026
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
yiguolei
previously approved these changes
Aug 4, 2026
…78-branch-4.1 # Conflicts: # be/src/exec/sink/writer/iceberg/viceberg_partition_writer.cpp
hubgeter
commented
Aug 5, 2026
ContributorAuthor
run buildall |
hello-stephen
commented
Aug 5, 2026
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Aug 5, 2026
Contributor
FE Regression Coverage ReportIncrement line coverage |
hello-stephen
commented
Aug 6, 2026
Contributor
FE UT Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Aug 13, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
What problem does this PR solve?
bp #64678
Problem Summary:
When a partition writer fails to close (e.g. hdfs sync error), it cleans up the partial file using
_file_name, but the file is actually created with_get_target_file_name()("{_file_name}-{_file_name_index}{ext}"). The mismatched path makes the cleanup a no-op, leaving an orphan data file on the storage.Use
_get_target_file_name()for the deletion so it matches the created path, for both the Iceberg and Hive partition writers.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)